-
Notifications
You must be signed in to change notification settings - Fork 660
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 exporter sanitize info metric #3572
Prometheus exporter sanitize info metric #3572
Conversation
PR is ready for review. I think there is no need to update the documentation, nonetheless, I left in the checklist During the fix I found another issue in a test: opentelemetry-python/exporter/opentelemetry-exporter-prometheus/tests/test_prometheus_exporter.py Line 361 in 3dfe224
Parts of the test are not executed because result[:0] returns an empty list, instead it should be something like prometheus_metric = result[0] .But I guess it is better to make a separate issue and PR for this (I can do that). |
@kornerc It looks like linting failed because
To fix, you can use
I'm now looking into the other CI failure to see how to fix it. |
@kornerc It seems like the only other error was unrelated:
So we can probably get this reviewed after linting is fixed. |
Thanks for the PR! |
@Jdsleppy thanks for the feedback and the info! In 170647e I reformattet the code and |
Description
The Prometheus Exporter did not sanitize the info metric.
This might prevent successful scraping from Prometheus when having, for example, dots in an attribute.
Fixes #3571 and #3563
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
test_target_info_sanitize
which checks if a character like a dot.
in an attribute name is translated to an underscore_
.Does This PR Require a Contrib Repo Change?
Checklist: