jenkinsci / opentelemetry-plugin

Monitor and observe Jenkins with OpenTelemetry.
https://plugins.jenkins.io/opentelemetry/
Apache License 2.0
93 stars 47 forks source link

Add additional prometheus labels to metrics #834

Open ehuizar1028 opened 2 months ago

ehuizar1028 commented 2 months ago

What feature do you want to see added?

Not sure if this is possible, and I could not figure out if the feature exists, but is it possible to add additional labels to prometheus metrics from within jenkins?

Example: jenkins.executor.online metric has a label that has the name of the build. Could we add additional labels to this metric? Seems like it's possible since the label can define the build name. Additional info like this can help create leaderboards in prometheus/grafana such as most running builds, most github repos checked out, etc.

I've also tried using opentelemetry collector processors such as metricstransform and attributes with upsert actions, but nothing seems to work.

Upstream changes

No response

Are you interested in contributing this feature?

No response

cyrille-leclerc commented 2 weeks ago

Can you please provide examples with the metric name and the attributes/labels you would like to add?