You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ python
Python 3.11.2 (main, Feb 17 2023, 09:28:16) [GCC 8.5.0 20210514 (Red Hat 8.5.0-18)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.platform()
'Linux-6.5.6-76060506-generic-x86_64-with-glibc2.28'
$ http http://127.0.0.1:9464 | head
# HELP python_gc_objects_collected_total Objects collected during gc
# TYPE python_gc_objects_collected_total counter
python_gc_objects_collected_total{generation="0"} 1.025664e+06
python_gc_objects_collected_total{generation="1"} 277619.0
python_gc_objects_collected_total{generation="2"} 27443.0
# HELP python_gc_objects_uncollectable_total Uncollectable objects found during GC
# TYPE python_gc_objects_uncollectable_total counter
python_gc_objects_uncollectable_total{generation="0"} 0.0
python_gc_objects_uncollectable_total{generation="1"} 0.0
python_gc_objects_uncollectable_total{generation="2"} 0.0
...
Have Prometheus pull metrics from port 9464.
What is the expected behavior?
I expect all the metrics to be pulled into Prometheus without error.
What is the actual behavior?
Prometheus errors when parsing the target_info metric
expected equal, got "." ("INVALID") while parsing: "target_info{service."
$ http http://127.0.0.1:9464 | grep target_info
# HELP target_info Target metadata
# TYPE target_info gauge
target_info{service.name="myservice",telemetry.auto.version="0.42b0",telemetry.sdk.language="python",telemetry.sdk.name="opentelemetry",telemetry.sdk.version="1.21.0"} 1.0
Additional context The regex given by Prometheus to describe valid label names does not allow for . characters like this exporter emits (service.name="...").
Support for target_info was added in #3073 and there is no environment variable to disable it.
The text was updated successfully, but these errors were encountered:
Jdsleppy
changed the title
Prometheus exporter emits invalid characters in metric labels
Prometheus exporter emits invalid characters in target_info metric
Dec 1, 2023
Describe your environment
Prometheus version
2.46.0
Steps to reproduce
Allow autoinstrumentation to set up the Prometheus metrics exporter
Verify that metrics are exposed:
Have Prometheus pull metrics from port
9464
.What is the expected behavior?
I expect all the metrics to be pulled into Prometheus without error.
What is the actual behavior?
Prometheus errors when parsing the
target_info
metricAdditional context
The regex given by Prometheus to describe valid label names does not allow for
.
characters like this exporter emits (service.name="..."
).Support for
target_info
was added in #3073 and there is no environment variable to disable it.The text was updated successfully, but these errors were encountered: