-
Notifications
You must be signed in to change notification settings - Fork 4.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 Namespace to prometheus helper mappings #11424
Add Namespace to prometheus helper mappings #11424
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.
Probably also worth updating the developer changelog with this addition.
r.Event(mb.Event{MetricSetFields: event}) | ||
r.Event(mb.Event{ | ||
MetricSetFields: event, | ||
Namespace: mapping.Namespace, |
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.
Should we set it only in here if it's not empty? Not sure if otherwise it could have some side effects?
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.
That's a string, so empty val is "" --> there should be no issue.
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 checked the code where the event is generated and indeed we check for ""
Add Namespace to
prometheus.MetricsMappings
When a namespace is specified it will propagated to the
mb.Event
objectFixes #11423