-
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
prevent conflict metric description #3469
Merged
MadVikingGod
merged 3 commits into
open-telemetry:main
from
fatsheep9146:prevent-conflict-metric-description
Dec 5, 2022
Merged
prevent conflict metric description #3469
MadVikingGod
merged 3 commits into
open-telemetry:main
from
fatsheep9146:prevent-conflict-metric-description
Dec 5, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a1a652a
to
4cb3b8f
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3469 +/- ##
=====================================
Coverage 78.0% 78.1%
=====================================
Files 165 165
Lines 11755 11809 +54
=====================================
+ Hits 9179 9228 +49
- Misses 2380 2385 +5
Partials 196 196
|
dashpole
reviewed
Nov 21, 2022
hanyuancheung
approved these changes
Nov 23, 2022
df1967a
to
3c84770
Compare
97f5e40
to
efd6eb0
Compare
dashpole
reviewed
Nov 28, 2022
dashpole
approved these changes
Nov 30, 2022
MrAlias
reviewed
Nov 30, 2022
a4d8c05
to
c68bee6
Compare
MrAlias
reviewed
Dec 1, 2022
Aneurysm9
reviewed
Dec 1, 2022
MrAlias
reviewed
Dec 1, 2022
dashpole
reviewed
Dec 1, 2022
prevent conflict metric info
69f5348
to
7c5e3d8
Compare
I add more test cases to cover all possible conflict cases,
|
dashpole
approved these changes
Dec 2, 2022
MrAlias
approved these changes
Dec 2, 2022
codeboten
added a commit
to open-telemetry/opentelemetry-collector-contrib
that referenced
this pull request
Nov 18, 2024
#36356) #### Description Fixes bug where exporting fails due to different help messages for the same metric. With this solution, the exporter will always export metrics of the same name with the first description it receives. This also rejects metrics whose types have changed. These changes follow the [spec](https://opentelemetry.io/docs/specs/otel/compatibility/prometheus_and_openmetrics/#metric-metadata-1): >Exporters MUST drop entire metrics to prevent conflicting TYPE comments, but SHOULD NOT drop metric points as a result of conflicting UNIT or HELP comments. Instead, all but one of the conflicting UNIT and HELP comments (but not metric points) SHOULD be dropped. If dropping a comment or metric points, the exporter SHOULD warn the user through error logging. Based on open-telemetry/opentelemetry-go#3469 #### Link to tracking issue Fixes #28617 <!--Describe what testing was performed and which tests were added.--> #### Testing Unit test cases added. --------- Co-authored-by: David Ashpole <dashpole@google.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
RutvikS-crest
pushed a commit
to RutvikS-crest/opentelemetry-collector-contrib
that referenced
this pull request
Dec 9, 2024
open-telemetry#36356) #### Description Fixes bug where exporting fails due to different help messages for the same metric. With this solution, the exporter will always export metrics of the same name with the first description it receives. This also rejects metrics whose types have changed. These changes follow the [spec](https://opentelemetry.io/docs/specs/otel/compatibility/prometheus_and_openmetrics/#metric-metadata-1): >Exporters MUST drop entire metrics to prevent conflicting TYPE comments, but SHOULD NOT drop metric points as a result of conflicting UNIT or HELP comments. Instead, all but one of the conflicting UNIT and HELP comments (but not metric points) SHOULD be dropped. If dropping a comment or metric points, the exporter SHOULD warn the user through error logging. Based on open-telemetry/opentelemetry-go#3469 #### Link to tracking issue Fixes open-telemetry#28617 <!--Describe what testing was performed and which tests were added.--> #### Testing Unit test cases added. --------- Co-authored-by: David Ashpole <dashpole@google.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
sbylica-splunk
pushed a commit
to sbylica-splunk/opentelemetry-collector-contrib
that referenced
this pull request
Dec 17, 2024
open-telemetry#36356) #### Description Fixes bug where exporting fails due to different help messages for the same metric. With this solution, the exporter will always export metrics of the same name with the first description it receives. This also rejects metrics whose types have changed. These changes follow the [spec](https://opentelemetry.io/docs/specs/otel/compatibility/prometheus_and_openmetrics/#metric-metadata-1): >Exporters MUST drop entire metrics to prevent conflicting TYPE comments, but SHOULD NOT drop metric points as a result of conflicting UNIT or HELP comments. Instead, all but one of the conflicting UNIT and HELP comments (but not metric points) SHOULD be dropped. If dropping a comment or metric points, the exporter SHOULD warn the user through error logging. Based on open-telemetry/opentelemetry-go#3469 #### Link to tracking issue Fixes open-telemetry#28617 <!--Describe what testing was performed and which tests were added.--> #### Testing Unit test cases added. --------- Co-authored-by: David Ashpole <dashpole@google.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Ziqi Zhao zhaoziqi9146@gmail.com
fix #3161
I take the logic in prometheus client_go as reference.
https://github.com/prometheus/client_golang/blob/449b46435075e6e069e05af920fe028b941033cf/prometheus/registry.go#L808-L863