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.
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
[prometheusremotewrite] add otel_scope_info metric to prometheus remote write exporter #24248
[prometheusremotewrite] add otel_scope_info metric to prometheus remote write exporter #24248
Changes from 7 commits
07e26dd
c0c0acd
000bb0b
b7a328b
57840c1
dabcd5d
8814c5a
3f146d9
75864aa
9cef3ce
a50c3ef
91b40e2
d47d532
b26d514
465443b
32f2736
a7a231c
8e36f96
4c1546a
9250192
8a0eb23
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
It will contain the name and version of the instrumentation scope. Isn't this information per se useful? It means that there is at least a single metric being emitted in that scope.
Having
scope_info
in the configuration enabled and not generating theotel_scope_info
metric is misleading and will confuse users.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.
looking into the compliance matrix, it seems that only PHP and rust will be able to set the scope using the Otel API?
So one more point to for users to have the least surprise by always emitting this metric?
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.
If one was looking for metrics under a specific scope, they'd probably do something like a topk query on
In general, actual usage of
otel_scope_info
is most likely after knowing the__name__
you're after thenThough the query would return no data if
otel_scope_info
doesn't exist. So if the feature is enabled, it might make sense to always report it so queries that use the metric always return data regardless of whether or not the joined labels add novel informationThere 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.
I pushed a commit that emitted the metric regardless.
But now I'm second guessing it. This has the potential to add a lot of active time series that won't be valuable the majority of the time. The collector could receive metrics from many languages and only PHP and rust even have the potential to make this metric add novel information. And the query with the join tends to be a rather advanced use case (so advanced that documentation doesn't exist around how to properly use
otel_scope_info
let alonetarget_info
) Additionally, not emitting the metric if it doesn't have attributes would align with the implementation oftarget_info
: https://github.com/blakeroberts-wk/opentelemetry-collector-contrib/blob/3f146d90bd9c622c33359c71fcae89162a263f2c/pkg/translator/prometheusremotewrite/helper.go#L589-L591