-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add job and instance as well-known labels in prometheus receiver #2897
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 job and instance as well-known labels in prometheus receiver #2897
Conversation
e6f1024 to
213e1be
Compare
Codecov Report
@@ Coverage Diff @@
## main #2897 +/- ##
=======================================
Coverage 91.74% 91.74%
=======================================
Files 286 286
Lines 15086 15088 +2
=======================================
+ Hits 13841 13843 +2
Misses 851 851
Partials 394 394
Continue to review full report at Codecov.
|
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.
Thanks!
|
@bjrara which of the linked issues are fully resolved by this PR? |
|
#2964 should address this issue. |
…orter (#2979) This is a follow up to #2897. Fixes #575 Fixes #2499 Fixes #2363 Fixes open-telemetry/prometheus-interoperability-spec#37 Fixes open-telemetry/prometheus-interoperability-spec#39 Fixes open-telemetry/prometheus-interoperability-spec#44 Passing compliance tests: $ go test --tags=compliance -run "TestRemoteWrite/otelcollector/Job.+" -v ./ === RUN TestRemoteWrite === RUN TestRemoteWrite/otelcollector === RUN TestRemoteWrite/otelcollector/JobLabel === PAUSE TestRemoteWrite/otelcollector/JobLabel === CONT TestRemoteWrite/otelcollector/JobLabel --- PASS: TestRemoteWrite (10.02s) --- PASS: TestRemoteWrite/otelcollector (0.00s) --- PASS: TestRemoteWrite/otelcollector/JobLabel (10.02s) PASS ok github.com/prometheus/compliance/remote_write 10.382s $ go test --tags=compliance -run "TestRemoteWrite/otelcollector/Instance.+" -v ./ === RUN TestRemoteWrite === RUN TestRemoteWrite/otelcollector === RUN TestRemoteWrite/otelcollector/InstanceLabel === PAUSE TestRemoteWrite/otelcollector/InstanceLabel === CONT TestRemoteWrite/otelcollector/InstanceLabel --- PASS: TestRemoteWrite (10.01s) --- PASS: TestRemoteWrite/otelcollector (0.00s) --- PASS: TestRemoteWrite/otelcollector/InstanceLabel (10.01s) PASS ok github.com/prometheus/compliance/remote_write 10.291s $ go test --tags=compliance -run "TestRemoteWrite/otelcollector/RepeatedLabels.+" -v ./ === RUN TestRemoteWrite === RUN TestRemoteWrite/otelcollector --- PASS: TestRemoteWrite (0.00s) --- PASS: TestRemoteWrite/otelcollector (0.00s) testing: warning: no tests to run PASS
|
After this PR was merged, I still don't see instance and job labels |
|
I'm using version 0.55.0 and I still don't see instance and job labels. |
…x-agent (open-telemetry#2897) * Bump github.com/hashicorp/vault in /pkg/signalfx-agent Bumps [github.com/hashicorp/vault](https://github.com/hashicorp/vault) from 1.12.2 to 1.12.5. - [Release notes](https://github.com/hashicorp/vault/releases) - [Changelog](https://github.com/hashicorp/vault/blob/main/CHANGELOG.md) - [Commits](hashicorp/vault@v1.12.2...v1.12.5) --- updated-dependencies: - dependency-name: github.com/hashicorp/vault dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * tidy --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Antoine Toulme <[email protected]>
In Prometheus,
jobandinstanceare the two auto generated labels, however they are both dropped by prometheus receiver. Although these information is still available inservice.nameandhost:port, it breaks the data contract for most Prometheus users (who usejobandinstanceto consume metrics in their own system).This PR adds
jobandinstanceas well-known labels in prometheus receiver to fix the issue.Link to tracking Issue:
#575
#2499
#2363
open-telemetry/prometheus-interoperability-spec#7