Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

zeitlinger
Copy link
Member

@zeitlinger zeitlinger commented May 19, 2025

@zeitlinger zeitlinger requested a review from a team as a code owner May 19, 2025 17:01
Copy link

codecov bot commented May 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.90%. Comparing base (f2f29f5) to head (2edc05f).
Report is 54 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pellared
Copy link
Member

pellared commented May 23, 2025

@zeitlinger, FYI. From open-telemetry/opentelemetry-go#5947 (comment):

SIG meeting:
We agreed that this can be merged before updating the spec given we have a preliminary consent with OTel-Prometheus SIG and both exporter and spec are "development".

@zeitlinger
Copy link
Member Author

@zeitlinger, FYI: open-telemetry/opentelemetry-go#5947 (comment)

from that comment

SIG meeting:
We agreed that this can be merged before updating the spec given we have a preliminary consent with OTel-Prometheus SIG and both exporter and spec are "development".

@ArthurSens
Copy link
Member

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!

@zeitlinger zeitlinger changed the title [DO NOT MERGE] add scope schema URL and attributes to prom attributes add scope schema URL and attributes to prom attributes Jun 5, 2025
@zeitlinger zeitlinger force-pushed the otel-scope-attributes branch from 23d8e5b to a1328aa Compare June 5, 2025 13:48
@zeitlinger
Copy link
Member Author

If removing the otel_scope_info metric is a breaking change for your SDK, you're empowered to decide how to roll this out!

This is not part of this PR - will discuss first how to address this

github-merge-queue bot pushed a commit to open-telemetry/opentelemetry-specification that referenced this pull request Jun 5, 2025
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 <[email protected]>
Co-authored-by: Carlos Alberto Cortez <[email protected]>
github-merge-queue bot pushed a commit to open-telemetry/opentelemetry-specification that referenced this pull request Jun 5, 2025
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 <[email protected]>
Co-authored-by: Carlos Alberto Cortez <[email protected]>
@zeitlinger zeitlinger force-pushed the otel-scope-attributes branch from a1328aa to 8cb8418 Compare June 6, 2025 15:01
@zeitlinger
Copy link
Member Author

@jack-berg can you take a look?

Copy link
Member

@jack-berg jack-berg left a 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.

zeitlinger and others added 2 commits July 9, 2025 17:10
…rometheus/Otel2PrometheusConverter.java

Co-authored-by: jack-berg <[email protected]>
@zeitlinger
Copy link
Member Author

@jack-berg please check again

@jack-berg jack-berg merged commit 05f6702 into open-telemetry:main Jul 10, 2025
29 checks passed
@zeitlinger zeitlinger deleted the otel-scope-attributes branch July 11, 2025 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants