-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Generate azure_resource_id #2897
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2897 +/- ##
==========================================
+ Coverage 91.40% 91.42% +0.01%
==========================================
Files 463 463
Lines 22834 22874 +40
==========================================
+ Hits 20872 20912 +40
Misses 1468 1468
Partials 494 494
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Code taken from https://github.com/signalfx/signalfx-agent/blob/master/pkg/core/hostid/azure.go#L18 with minor modifications. Tested on Azure (standalone VM and Scale Set).
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.
lgtm, apart from the one comment.
Code taken from https://github.com/signalfx/signalfx-agent/blob/master/pkg/core/hostid/azure.go#L18 with minor modifications. Tested on Azure (standalone VM and Scale Set).
…2897) In Prometheus, `job` and `instance` are the two auto generated labels, however they are both dropped by prometheus receiver. Although these information is still available in `service.name` and `host`:`port`, it breaks the data contract for most Prometheus users (who use `job` and `instance` to consume metrics in their own system). This PR adds `job` and `instance` as well-known labels in prometheus receiver to fix the issue. **Link to tracking Issue:** open-telemetry/opentelemetry-collector#575 open-telemetry/opentelemetry-collector#2499 open-telemetry/opentelemetry-collector#2363 open-telemetry/wg-prometheus#7
…orter (#2979) This is a follow up to #2897. Fixes #575 Fixes #2499 Fixes #2363 Fixes open-telemetry/wg-prometheus#37 Fixes open-telemetry/wg-prometheus#39 Fixes open-telemetry/wg-prometheus#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
Hi, This is wrong, azure resource name and hostname can be different Actually it generates on some of my VM an ID with localhost inside Azure Resource ID is part of the VM metadata Best regards, |
When a resource detection processor is running and we're in an Azure environment, we can use the
Azure resource attributes to generate an
azure_resource_id
, which is used by the SFx backend.This functionality aims to provide parity with the SFx Smart Agent's generation of
azure_resource_id
.Some code taken from https://github.com/signalfx/signalfx-agent/blob/master/pkg/core/hostid/azure.go#L18
Tested on Azure (standalone VM and Scale Set).