-
Notifications
You must be signed in to change notification settings - Fork 417
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 label keys must not include colons #2289
Labels
bug
Something isn't working
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
Comments
github-actions
bot
added
the
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
label
Sep 1, 2023
marcalff
added
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
and removed
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
labels
Sep 6, 2023
punya
added a commit
to punya/opentelemetry-cpp
that referenced
this issue
Sep 25, 2023
punya
added a commit
to punya/opentelemetry-cpp
that referenced
this issue
Sep 25, 2023
3 tasks
punya
added a commit
to punya/opentelemetry-cpp
that referenced
this issue
Sep 25, 2023
punya
added a commit
to punya/opentelemetry-cpp
that referenced
this issue
Sep 25, 2023
punya
added a commit
to punya/opentelemetry-cpp
that referenced
this issue
Sep 25, 2023
punya
added a commit
to punya/opentelemetry-cpp
that referenced
this issue
Sep 25, 2023
punya
added a commit
to punya/opentelemetry-cpp
that referenced
this issue
Sep 25, 2023
punya
added a commit
to punya/opentelemetry-cpp
that referenced
this issue
Sep 26, 2023
punya
added a commit
to punya/opentelemetry-cpp
that referenced
this issue
Sep 26, 2023
marcalff
pushed a commit
that referenced
this issue
Sep 27, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
What is the expected behavior?
From https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/compatibility/prometheus_and_openmetrics.md#metric-attributes,
Metric names are allowed to include colons, but label keys are not.
What is the actual behavior?
SetMetricBasic translates attributes to prometheus labels:
opentelemetry-cpp/exporters/prometheus/src/exporter_utils.cc
Lines 261 to 276 in f52ec6c
It uses the same sanitization function used for metric names:
opentelemetry-cpp/exporters/prometheus/src/exporter_utils.cc
Lines 131 to 139 in f52ec6c
...which allows colons as a valid character.
The text was updated successfully, but these errors were encountered: