-
Notifications
You must be signed in to change notification settings - Fork 773
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
[prometheus] Support meter-level tags #5837
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5837 +/- ##
==========================================
+ Coverage 83.38% 86.30% +2.91%
==========================================
Files 297 257 -40
Lines 12531 11172 -1359
==========================================
- Hits 10449 9642 -807
+ Misses 2082 1530 -552
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Great job!
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.
LGTM
@@ -404,6 +404,15 @@ public static int WriteTags(byte[] buffer, int cursor, Metric metric, ReadOnlyTa | |||
buffer[cursor++] = unchecked((byte)','); | |||
} | |||
|
|||
if (metric.MeterTags != null) |
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.
I see that the current tests have been updated to validate MeterTags
. Is there a test that validates null MeterTags
?"
I've added some additional tests as requested. I think a follow-up PR is required to refactor these tests a bit, since we have quite a few different combinations of conditions. |
Fixes #
#5836
Changes
Adds meter-level tags to Prometheus exporter. Any tags added to meter are automatically added to scrape output.
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes