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: 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_sanitizewhich 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: