-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: Add otel_scope_schema_url and otel_scope_[attribute] labels #5947
base: main
Are you sure you want to change the base?
Conversation
@dashpole PTAL |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5947 +/- ##
=====================================
Coverage 84.6% 84.6%
=====================================
Files 272 272
Lines 22864 22872 +8
=====================================
+ Hits 19348 19356 +8
Misses 3172 3172
Partials 344 344 |
|
||
attrKeys, attrVals := getAttrs(scopeMetrics.Scope.Attributes) | ||
for i := range attrKeys { | ||
attrKeys[i] = "otel_scope_" + attrKeys[i] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about also adding otel_scope_
prefix for the otel_scope_info
metric, but I feel that this would be a breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. There isn't really any purpose to the otel_scope_info metric anymore, since it duplicates labels already available on metrics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about backwards compatibility for OTel Collector Prometheus receiver? Jot needed as it is not stable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use an env var to gate the feature and allow migrating from otel_scope_info to otel_scope_. We probably shouldn't produce both at once.
Towards open-telemetry/opentelemetry-specification#4223 and #5846
otel_scope_schema_url
label tootel_scope_info
metricotel_scope_schema_url
label to "real" OTel metricsotel_scope_[attribute]
labels to "real" OTel metricsSide notes:
otel_scope_name
attribute. I think the exporter should ignore all attributes with names that have prefixotel_scope_
. This scenario is also not covered by the spec.