-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[prometheusexporter] Expose job and instance labels #9115
[prometheusexporter] Expose job and instance labels #9115
Conversation
Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
@dashpole Could you look at my approach of plumbing the resource attributes all the way down, and let me know if it looks okay? If it does, I will work on adding tests. |
It looks good to me! |
Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
I've added the tests and the tests caught a bug 😀 @dashpole I think this is ready for review! |
Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
@gouthamve Could you please update https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/prometheusexporter/README.md to explain the behavior regarding new I have added those labels myself in a way so have to be careful not to break anything. |
Yes. I'll update the docs now. |
See: open-telemetry#9115 (comment) But should I document how we generate the `job` and `instance` labels as well? Like `service.name`, etc. Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
NOTE: This is WIP PR and I wanted to understand if my approach is right before I write the tests for this.
Description:
Fixes #8355
Testing: I've run the collector with the following config and the exposed metrics had
job
andinstance
attached to them: