-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
receiver/prometheus: Metric adjuster sets start time incorrectly when honor_labels==true #36477
Labels
Comments
ridwanmsharif
added
bug
Something isn't working
needs triage
New item requiring triage
labels
Nov 20, 2024
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Let me know if you need any help with this |
andrzej-stencel
pushed a commit
that referenced
this issue
Dec 16, 2024
…esource (#36479) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This change removes as assumption that all metrics in a single scrape come from the same resource. This is indeed not true when `honor_labels` is set to `true` AND when the scraped metrics contain a `job` or `instance` label. <!-- Issue number (e.g. #1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes #36477 <!--Describe what testing was performed and which tests were added.--> #### Testing Added unit tests <!--Describe the documentation added.--> #### Documentation N/A <!--Please delete paragraphs that you did not use before submitting.-->
sbylica-splunk
pushed a commit
to sbylica-splunk/opentelemetry-collector-contrib
that referenced
this issue
Dec 17, 2024
…esource (open-telemetry#36479) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This change removes as assumption that all metrics in a single scrape come from the same resource. This is indeed not true when `honor_labels` is set to `true` AND when the scraped metrics contain a `job` or `instance` label. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#36477 <!--Describe what testing was performed and which tests were added.--> #### Testing Added unit tests <!--Describe the documentation added.--> #### Documentation N/A <!--Please delete paragraphs that you did not use before submitting.-->
mterhar
pushed a commit
to mterhar/opentelemetry-collector-contrib
that referenced
this issue
Dec 19, 2024
…esource (open-telemetry#36479) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This change removes as assumption that all metrics in a single scrape come from the same resource. This is indeed not true when `honor_labels` is set to `true` AND when the scraped metrics contain a `job` or `instance` label. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#36477 <!--Describe what testing was performed and which tests were added.--> #### Testing Added unit tests <!--Describe the documentation added.--> #### Documentation N/A <!--Please delete paragraphs that you did not use before submitting.-->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Component(s)
receiver/prometheus
What happened?
Description
When
honor_labels
is set totrue
- the metrics could override thejob
andinstance
labels. But the metrics adjuster assumes that all the metrics from a single scrape share the same job and instance which isn't true.opentelemetry-collector-contrib/receiver/prometheusreceiver/internal/metrics_adjuster.go
Lines 260 to 265 in 15ddc29
Acceptance Criteria: validate and test against this assumption. Or add assertion that all metrics must come from the same resource if that is intended.
Collector version
all versions of contrib
Environment information
Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
No response
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: