-
Notifications
You must be signed in to change notification settings - Fork 897
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
Improve conversion of resource attributes to/from prometheus #2381
Merged
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
…esource attributes
Aneurysm9
reviewed
Feb 24, 2022
bogdandrutu
reviewed
Feb 25, 2022
dashpole
force-pushed
the
prom_resource
branch
from
February 25, 2022 14:58
af45428
to
0fb5fca
Compare
Aneurysm9
approved these changes
Feb 25, 2022
Co-authored-by: Anthony Mirabella <[email protected]>
bogdandrutu
approved these changes
Mar 1, 2022
gouthamve
reviewed
Mar 2, 2022
jsuereth
approved these changes
Mar 4, 2022
jmacd
approved these changes
Mar 4, 2022
This was referenced Mar 5, 2022
carlosalberto
pushed a commit
to carlosalberto/opentelemetry-specification
that referenced
this pull request
Oct 31, 2024
…lemetry#2381) * update resource attributes used by prometheus, and round-trip other resource attributes * address feedbck * address feedbck * map target_info to resource, and use service.instance.id for instance * formatting * be clear on metric family vs metric point * Update specification/metrics/datamodel.md Co-authored-by: Anthony Mirabella <[email protected]> * change deliniator to / * fix formatting Co-authored-by: Anthony Mirabella <[email protected]> Co-authored-by: Bogdan Drutu <[email protected]>
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.
Fixes #1782
Related: open-telemetry/opentelemetry-collector-contrib#7081
Changes
Job and Instance <-> Resources Attributes
(Discussion in open-telemetry/opentelemetry-collector-contrib#7081)
Job
Current:
job
prom label ->job
resource attribute ->job
prom label.New:
job
prom label ->service.name
resource attribute ->job
prom label.This will improve the OTLP receiver (and others) -> Prometheus remote write exporter path, since
service.name
is more likely to be present thanjob
on metrics not originating from prometheus receivers.Instance
Current:
instance
prom label ->instance
resource attribute ->instance
prom label.New:
instance
prom label ->service.instance.id
resource attributes ->instance
prom label.This will improve the OTLP receiver (and others) -> Prometheus remote write exporter path, since
service.instance.id
are more likely to be present thaninstance
on metrics not originating from prometheus receivers.This will also improve the Prometheus receiver -> OTLP (and other) exporter path, since
net.host.name
+net.host.port
align better with semantic conventions thanhost.name
+port
orinstance
. As discussed in the linked issue, http metric conventions are the best fit for these attributes.Other Resource Attributes <-> target_info
OpenMetrics explicitly defines a way for exporters which discover their own resource information to send metadata with a batch of Prometheus metrics: the target_info metric. This PR describes how this metric SHOULD be used, although it doesn't mandate its use.
cc @Aneurysm9 @jmacd @jsuereth @bogdandrutu @djaglowski