Skip to content

[baseserver] Add metric with version of the server, use in public api and usage #13022

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
Sep 16, 2022

Conversation

easyCZ
Copy link
Member

@easyCZ easyCZ commented Sep 16, 2022

Description

To be able to track which version we're on in our dashboards. Will produce the following metric:

gitpod_server_version{version="<version>"} 1

Once validated, I can also add this to other instances of baseserver

The approach to the metric with version is standard, see docs

Related Issue(s)

Fixes #

How to test

Release Notes

NONE

Documentation

Werft options:

  • /werft with-preview

@easyCZ easyCZ requested review from a team September 16, 2022 07:38
@github-actions github-actions bot added team: webapp Issue belongs to the WebApp team team: workspace Issue belongs to the Workspace team labels Sep 16, 2022
@easyCZ easyCZ force-pushed the mp/baseserver-report-server-version-in-metrics branch 2 times, most recently from f1d54e5 to 8051afb Compare September 16, 2022 10:12
@@ -37,7 +37,7 @@ func run() *cobra.Command {
log.WithError(err).Fatal("Failed to get config. Did you specify --config correctly?")
}

err = server.Start(cfg)
err = server.Start(cfg, Version)
Copy link
Contributor

Choose a reason for hiding this comment

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

I see that this Version is set during build, but how and where it is set and what is the format of the version string?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've observed either commit-<hash> or main.<build-id>

It's set by the CI job when it builds the images

@easyCZ easyCZ force-pushed the mp/baseserver-report-server-version-in-metrics branch from 8051afb to bfb957c Compare September 16, 2022 11:27
@easyCZ
Copy link
Member Author

easyCZ commented Sep 16, 2022

/hold to not block merge Q

@easyCZ
Copy link
Member Author

easyCZ commented Sep 16, 2022

/werft run

👍 started the job as gitpod-build-mp-baseserver-report-server-version-in-metric.4
(with .werft/ from main)

@easyCZ
Copy link
Member Author

easyCZ commented Sep 16, 2022

/unhold

@roboquat roboquat merged commit 42224ae into main Sep 16, 2022
@roboquat roboquat deleted the mp/baseserver-report-server-version-in-metrics branch September 16, 2022 12:20
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Sep 19, 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: workspace Workspace team change is running in production deployed Change is completely running in production release-note-none size/M team: webapp Issue belongs to the WebApp team team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants