-
Notifications
You must be signed in to change notification settings - Fork 927
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 Armeria version metric #2179
Conversation
That is awesome, @matsumana. I love it! What do you think about adding other labels such as |
Codecov Report
@@ Coverage Diff @@
## master #2179 +/- ##
============================================
- Coverage 73.62% 73.61% -0.02%
+ Complexity 9581 9580 -1
============================================
Files 837 837
Lines 36883 36898 +15
Branches 4548 4548
============================================
+ Hits 27155 27162 +7
- Misses 7402 7412 +10
+ Partials 2326 2324 -2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool feature
final MeterRegistry meterRegistry = server.config().meterRegistry(); | ||
assertThat(meterRegistry.find("armeria.build.info") | ||
.gauge() | ||
.value()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about also checking the three tags exist (though not checking their values which isn't constant)
Sounds good.
I added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thanks! @matsumana
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just two nits. Let me push a change directly to your branch and merge. Thank you!
Oh, just found this comment. Armeria currently is using camel case convention for label names, e.g. |
It was my misunderstanding. Thank you for changing the label. |
Ah, it was about meter names rather than label names :-) Will merge soon! |
Much appreciated, @matsumana ! 👍 |
Thank you! |
Motivation: - Want to check Armeria version with Grafana FYI: In Prometheus best practices, this kind of metric is described as follows. https://prometheus.io/docs/practices/naming/ > foobar_build_info (for a pseudo-metric that provides metadata about the running binary) e.g. ``` # HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, and goversion from which node_exporter was built. # TYPE node_exporter_build_info gauge node_exporter_build_info{branch="master",goversion="go1.7.5",revision="840ba5dcc71a084a3bc63cb6063003c1f94435a6",version="0.14.0"} 1 ``` Modifications: - Add Armeria version metric Result: It's exported as follows: Labels: - `commit` - `version` - `repoStatus` ``` # HELP armeria_build_info A metric with a constant '1' value labeled by version and commit hash from which Armeria was built. # TYPE armeria_build_info gauge armeria_build_info{commit="74700d402178e00045b1ca23006f7f6131b2a92d",version="0.94.1-SNAPSHOT",repoStatus="clean"} 1.0 ```
Hello, I've added Armeria version metric.
Motivation:
Want to check Armeria version with Grafana
FYI:
In Prometheus best practices, this kind of metric is described as follows.
https://prometheus.io/docs/practices/naming/
e.g.
Modifications:
Result:
It's exported as follows
Labels:
example dashboard: