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 build_info metric & use it in generated queries #69

Merged
merged 2 commits into from
Apr 20, 2023
Merged

Conversation

emschwartz
Copy link
Contributor

@emschwartz emschwartz commented Apr 19, 2023

The queries get uglier, but I think it's a pretty great feature 😁

Implements https://github.com/orgs/autometrics-dev/discussions/10

@emschwartz emschwartz requested a review from mellowagain April 19, 2023 12:57
Copy link
Member

@mellowagain mellowagain left a comment

Choose a reason for hiding this comment

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

looks good but don't we want to feature flag this? or does not providing AUTOMETRICS_COMMIT result in basically the same as not setting the feature flag (if it existed)?

@emschwartz
Copy link
Contributor Author

@mellowagain if you don't provide AUTOMETRICS_COMMIT and don't use vergen, the commit label will just be an empty string

@emschwartz emschwartz merged commit 8400d90 into main Apr 20, 2023
@emschwartz emschwartz deleted the build-info branch April 20, 2023 12:40
gagbo added a commit to autometrics-dev/autometrics-go that referenced this pull request Apr 21, 2023
This allows use cases where we can see and query the changes in metrics
after a version change in the code base.

Ref: autometrics-dev/autometrics-rs#69
Ref: https://github.com/orgs/autometrics-dev/discussions/10
gagbo added a commit to autometrics-dev/autometrics-go that referenced this pull request May 9, 2023
* Add build information to the metrics/queries

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

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

* Add --help and --version flags to the binary

Closes: #36

* !Breaking: Use go-arg to parse generator arguments

Breaking change: the long flags in autometrics now take the long form
arguments starting with --

Also removes the unused `am-alertsgen` binary. Even though for the time
being we are using sloth to generate the alerts, at some point we might
want to change, and adding extra code/friction to do the change seems
unwarranted for now.
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