Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add segment reporter #157

Merged
merged 4 commits into from
Jul 3, 2023
Merged

Add segment reporter #157

merged 4 commits into from
Jul 3, 2023

Conversation

csweichel
Copy link
Collaborator

@csweichel csweichel commented Jul 2, 2023

Description

This PR adds a Segment reporter to Leeway. This reporter helps us track the performance/efficiency of our build setup. To use it, use --report-segment=<WRITE_KEY> or the LEEWAY_SEGMENT_KEY env var. The latter is particularly useful for enabling this feature in GitHub actions.

The reporter produces the following events:

  • A track event when a package build finishes:
    {
        "anonymousId": "391edb6c-891d-454a-b0e3-07f572b5f71d",
        "event": "package_build_finished",
        "timestamp": "2023-07-02T12:43:14.344840785Z",
        "context": {
            "app": {
                "name": "leeway",
                "version": "unkown"
            },
            "os": {
                "name": "linux"
            }
        },
        "properties": {
            "commit": "f122bad8ed63f11505d09f1255db46fefad1e96b",
            "dirtyWorkingCopy": false,
            "durationMS": 2453,
            "lastPhase": "build",
            "name": "//:app",
            "repo": "https://github.com/gitpod-io/leeway.git",
            "success": true
        }
    }

In addition, this PR adds "build phases" which provide more fine-grained feedback of the build progress and failure modes. These are the build phases, executed in this order:

  • prep
  • pull
  • lint
  • test
  • build
  • package

@codecov
Copy link

codecov bot commented Jul 2, 2023

Codecov Report

Merging #157 (a673d62) into main (3bad410) will decrease coverage by 0.19%.
The diff coverage is 0.00%.

@@           Coverage Diff            @@
##            main    #157      +/-   ##
========================================
- Coverage   8.58%   8.39%   -0.19%     
========================================
  Files         20      20              
  Lines       3320    3394      +74     
========================================
  Hits         285     285              
- Misses      2983    3057      +74     
  Partials      52      52              

@csweichel csweichel marked this pull request as ready for review July 2, 2023 12:49
@csweichel csweichel merged commit 53be4e9 into main Jul 3, 2023
@csweichel csweichel deleted the cw/segment branch July 3, 2023 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants