Skip to content

[server] Add metric for completed image builds #14296

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

Merged
merged 1 commit into from
Nov 1, 2022

Conversation

andrew-farries
Copy link
Contributor

@andrew-farries andrew-farries commented Oct 31, 2022

Description

Add a counter for completed image builds gitpod_server_image_builds_completed_total to server with dimensions for successful and failed image builds.

Increment the relevant counter when an image build succeeds or fails.

Related Issue(s)

Part of #12960

How to test

(tbd once preview envs are working again).

Release Notes

NONE

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide

@andrew-farries andrew-farries requested a review from a team October 31, 2022 17:21
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-af-metric-for-server-image-build-completions.11 because the annotations in the pull request description changed
(with .werft/ from main)

@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Oct 31, 2022
@andrew-farries
Copy link
Contributor Author

/hold for dependency #14204

@@ -1302,6 +1307,11 @@ export class WorkspaceStarter {
}
}

// Register a successful image build only if the image actually needed to be built; ie the build was not a no-op.
if (result.actuallyNeedsBuild) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One way to avoid this case would be to export both the started and completed metrics with a label of needed_build. This would still keep it semantic, and would give you the ability to filter these out in the SLO.

Copy link
Member

@easyCZ easyCZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Will need rebase when dependency lands

Base automatically changed from af/fix-server-image-build-total-metric to main November 1, 2022 08:56
@roboquat roboquat added size/M and removed size/S labels Nov 1, 2022
Add a counter to track the number of image builds recorded as completed
by `server`, broken down by outcome (succeeded, failed).
@andrew-farries andrew-farries force-pushed the af/metric-for-server-image-build-completions branch from 05e0478 to 371d0c2 Compare November 1, 2022 08:57
@roboquat roboquat added size/S and removed size/M labels Nov 1, 2022
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-af-metric-for-server-image-build-completions.13 because the annotations in the pull request description changed
(with .werft/ from main)

@roboquat roboquat merged commit b88d9bb into main Nov 1, 2022
@roboquat roboquat deleted the af/metric-for-server-image-build-completions branch November 1, 2022 11:52
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/S team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants