-
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
Error: "http.method" is not a valid label name for metric #2772
Comments
Haven't tested it but has this issue fixed by open-telemetry/opentelemetry-collector#2707? Update: this version works for me. But it introduces a possible duplicate labels problem. For example Do you think this is a bug or something we can fix? I am happy to open a pr for this. |
@yeya24 Thanks for the heads up on open-telemetry/opentelemetry-collector#2707 and good catch on the duplicate labels issue. I think we should check for the default reserved sanitized labels like If "overlapping" non-reserved optional dimensions are defined like
I prefer the latter because it's explicit and avoids surprises. What do you think? |
Yes I think this makes to me. But for overlapping non-reserved dimensions, I think we should check them on startup and throw error as well? |
@yeya24 yes, good idea. Did you still want to work on this PR? |
@albertteoh Yes, pr opened #2844. Please take a look when you have time. |
…y#2772) Signed-off-by: Bogdan Drutu <[email protected]>
Signed-off-by: Bogdan Drutu <[email protected]>
Describe the bug
Running Otel-collector from v0.22.0 with
spanmetrics
processor enabled in a trace pipeline results in errors and no metrics exported.Steps to reproduce
Run Otel-collector with
spanmetrics
processor in a trace pipeline, then send traces containing span tags with periods.
in them likespan.kind
orhttp.method
.What did you expect to see?
No error.
What did you see instead?
What version did you use?
Version: v0.22.0
What config did you use?
Config:
Environment
OS: macOS
Compiler(if manually compiled): go 1.16
Additional context
I believe the root cause is from this line that checks label names only contain alphanumeric chars or
_
, triggering errors for labels containing.
likespan.kind
andhttp.method
.That line of code is 5 years old, but there was a recent rewrite of prometheus exporter which calls prometheus' client_golang lib, and I think this is why we're seeing this error from v0.22.0.
Given
.
char is invalid in prometheus labels, I propose to fix this in spanmetrics processor by replacing all non-alphanumeric chars with_
.The text was updated successfully, but these errors were encountered: