- Notifications
You must be signed in to change notification settings - Fork 912
add scope schema URL and attributes to prom attributes #7356
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
add scope schema URL and attributes to prom attributes #7356
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@ ## main #7356 +/- ## ============================================ + Coverage 89.77% 89.90% +0.13% - Complexity 6982 7011 +29 ============================================ Files 797 798 +1 Lines 21160 21219 +59 Branches 2056 2056 ============================================ + Hits 18996 19078 +82 + Misses 1503 1484 -19 + Partials 661 657 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
.../prometheus/src/main/java/io/opentelemetry/exporter/prometheus/Otel2PrometheusConverter.java Show resolved Hide resolved
| @zeitlinger, FYI. From open-telemetry/opentelemetry-go#5947 (comment):
|
.../prometheus/src/main/java/io/opentelemetry/exporter/prometheus/Otel2PrometheusConverter.java Show resolved Hide resolved
.../prometheus/src/main/java/io/opentelemetry/exporter/prometheus/Otel2PrometheusConverter.java Show resolved Hide resolved
from that comment
|
| This is just a heads-up that the spec change this PR addresses has already been approved and is about to be merged! So you're good to proceed. If removing the otel_scope_info metric is a breaking change for your SDK, you're empowered to decide how to roll this out! |
23d8e5b to a1328aa Compare
This is not part of this PR - will discuss first how to address this |
Fixes #4223 Prototypes: - open-telemetry/opentelemetry-go#5947 - open-telemetry/opentelemetry-go#6770 - open-telemetry/opentelemetry-java#7356 - open-telemetry/opentelemetry-collector-contrib#40060 - open-telemetry/opentelemetry-collector-contrib#40004 ## Changes Currently (before this PR) [Prometheus and OpenMetrics Compatibility](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/compatibility/prometheus_and_openmetrics.md) assumes that only scope name and scope version are identifying. However, with #4161 this is no longer true. Therefore, this PR updates the Prometheus and OpenMetrics Compatibility specification to add the scope name, version, schema URL, scope attributes to all metrics. This also removes the `otel_scope_info` as it looks that it won't be useful. See: #4223 (comment). This change important for Collector open-telemetry/opentelemetry-go#5846 (comment). It is also is necessary towards stabilization of OTel-Prom/OpenMetrics compatibility) and the Prometheus exporter. _Initially, I thought about [splitting it into a few PRs](#4223 (comment)). However, it looks like doing it in one PR would be a more complete approach (also there are not that many changes)._ --------- Co-authored-by: Jade Guiton <jade.guiton@datadoghq.com> Co-authored-by: Carlos Alberto Cortez <calberto.cortez@gmail.com>
Fixes #4223 Prototypes: - open-telemetry/opentelemetry-go#5947 - open-telemetry/opentelemetry-go#6770 - open-telemetry/opentelemetry-java#7356 - open-telemetry/opentelemetry-collector-contrib#40060 - open-telemetry/opentelemetry-collector-contrib#40004 ## Changes Currently (before this PR) [Prometheus and OpenMetrics Compatibility](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/compatibility/prometheus_and_openmetrics.md) assumes that only scope name and scope version are identifying. However, with #4161 this is no longer true. Therefore, this PR updates the Prometheus and OpenMetrics Compatibility specification to add the scope name, version, schema URL, scope attributes to all metrics. This also removes the `otel_scope_info` as it looks that it won't be useful. See: #4223 (comment). This change important for Collector open-telemetry/opentelemetry-go#5846 (comment). It is also is necessary towards stabilization of OTel-Prom/OpenMetrics compatibility) and the Prometheus exporter. _Initially, I thought about [splitting it into a few PRs](#4223 (comment)). However, it looks like doing it in one PR would be a more complete approach (also there are not that many changes)._ --------- Co-authored-by: Jade Guiton <jade.guiton@datadoghq.com> Co-authored-by: Carlos Alberto Cortez <calberto.cortez@gmail.com>
a1328aa to 8cb8418 Compare | @jack-berg can you take a look? |
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.
Small suggestion, but this looks good. In practice, the scope attributes bit of this won't impact any users right now because we never landed the APIs to be able to associate attributes with meter, tracer, logger.
.../prometheus/src/main/java/io/opentelemetry/exporter/prometheus/Otel2PrometheusConverter.java Outdated Show resolved Hide resolved
…rometheus/Otel2PrometheusConverter.java Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
| @jack-berg please check again |
Reference implementation: open-telemetry/opentelemetry-go#5947
Towards open-telemetry/opentelemetry-specification#4223