-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 custom tags to MicrometerCapability #2305
Add custom tags to MicrometerCapability #2305
Conversation
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.
Look good, any chance to replicate this on dropwizard metrics too?
|
||
public MicrometerCapability(MeterRegistry meterRegistry, Map<String, String> tagsMap) { | ||
List<Tag> tagsList = mapTags(tagsMap); | ||
meterRegistry.config().commonTags(tagsList); |
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.
Do you think this would be testable under our current tests?
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.
@BartekBanachowicz what about this?
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.
For now, the answer from my side is no. Not because it isn't doable, but because I don't know how to achieve it yet. I'm still digging through existing test classes
Of course, but I'd prefer to do it in a separate issue |
* #1456 | Add custom tags to MicrometerCapability * Update MicrometerCapability.java license year --------- Co-authored-by: Marvin <velo@users.noreply.github.com>
* #1456 | Add custom tags to MicrometerCapability * Update MicrometerCapability.java license year --------- Co-authored-by: Marvin <velo@users.noreply.github.com>
This pull request adds new constructors to
MicrometerCapability
, so the clients are now able to add custom tags toMeterRegistry
from the builder level.Two new constructors were added. The first one can take a
List<Tags>
:The second one can take a
Map<String, String>
of Keys and Values:Closes #1456