autometrics-dev / autometrics-go

Easily add metrics to your system -- and actually understand them using automatically customized Prometheus queries
https://autometrics.dev
Apache License 2.0
142 stars 9 forks source link

Add build information to the metrics/queries #34

Closed gagbo closed 1 year ago

gagbo commented 1 year ago

This allows use cases where we can see and query the changes in metrics after a version change in the code base.

Ref: https://github.com/autometrics-dev/autometrics-rs/pull/69 Ref: https://github.com/orgs/autometrics-dev/discussions/10

gagbo commented 1 year ago

I'll add a recipe to modify the build information stuff within a dockerfile, it will make the PR significantly larger as the examples have not been set up to work with a build script (mostly to avoid issues with docker contexts)

gagbo commented 1 year ago

I'm also switching command line argument parsing a bit to use go-arg, it helps make leaner code in the parsing phase, and auto-generates a good help message

image

The Autometrics v0.3.1-6-g323548f (Built on Fri Apr 28 10:32:02 UTC 2023) line is also the output of autometrics --version