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 version string to metrics #18061
Comments
Sounds like a useful feature. But Prometheus does not support string metrics and adding version string as a label does not sound like a good idea. Maybe we should convert semver to an integer e.g. 1.15.9 = 1 * 100^2 + 15 * 100 + 9 = 11509 |
@Flygrounder that's a good suggestion, although I'm not sure it'd work in all cases, as there are occasions when the version wouldn't always be in a format that could be converted so cleanly, ex |
But this is only the case with dev versions, for which you probably do not want to get alerts because they are constantly updated. Perhaps in that case reporting |
I think we had better keep the original version format, and just use a new field like |
To be clear, I was talking only about converting semver to an integer in Prometheus metrics, not for the entire project. Additional benefit of having version metric in contrast to |
- Add `NumAppVer` variable to store the app version numerically - Add new "version" metric, collector for Prometheus Resolves: go-gitea#18061
If you've just gotten a notification about my PR, I regret to inform you that I am being forced to make my PR as part of an academic assignment. I will be closing it after the assignment has been submitted, unless for some reason this is deemed an acceptable fix. |
Feature Description
Hi,
I'm monitoring my Gitea instance via Prometheus and Grafana.
It would be great to have a string for the current Gitea version and the new one in the metrics to set an Grafana alert for possible new version on it.
Screenshots
No response
The text was updated successfully, but these errors were encountered: