Unify queueSize
metric description and attribute
#5836
Merged
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 #4834
Also references #4382 and #5066
The Java SDK, when auto-configured, will emit 2 metrics with the same metric name (
queueSize
) but a different description. Combined with the very popular Prometheus exporter in the OpenTelemetry Collector, this leads to an error and 1 of the 2 metrics being dropped. The metric is emitted as part of the Batch*Processors for traces and logs.This PR uses the same description for both metrics and updates an attribute key to be common across both. The Attribute name could be seen as a larger change outside the scope of this PR, and I'm happy to remove it. In my opinion, when I look at how this metric could be used, I see a benefit with using a common name of
processorType
for the attribute key.I also understand there may be a larger issue at the specification level to help resolve this, but this issue has existed for well over a year. It can be resolved with this PR while waiting for the specification to be clearer on handling these use cases.