Span processor metrics use unit span instead of {span}
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- java
- Domain
- observability-sre
Research direction
Start in SemConvSpanProcessorInstrumentation.java at lines 86, 92, and 107, then compare the units used by SdkTracerInstrumentation and SemConvLogRecordProcessorInstrumentation. Reproduce with SimpleSpanProcessor or BatchSpanProcessor, InMemoryMetricReader, and the latest internal telemetry version; done means all three span processor metrics use the semantic-convention unit and exporter names no longer gain the incorrect suffix.
Written by the indexing model from the issue text.
Description
Describe the bug
SemConvSpanProcessorInstrumentation registers otel.sdk.processor.span.processed, otel.sdk.processor.span.queue.size and otel.sdk.processor.span.queue.capacity with unit span. Semantic conventions define the unit of all three as {span}.
Steps to reproduce
Build a processor with SimpleSpanProcessor.builder(exporter).setMeterProvider(meterProvider), end a span, and collect metrics with InMemoryMetricReader. BatchSpanProcessor behaves the same with setInternalTelemetryVersion(InternalTelemetryVersion.LATEST) or otel.experimental.sdk.telemetry.version=latest.
What did you expect to see?
Unit {span}, as in semconv and SdkTracerInstrumentation (otel.sdk.span.started / otel.sdk.span.live). The logs sibling SemConvLogRecordProcessorInstrumentation uses {log_record}.
What did you see instead?
Unit span (SemConvSpanProcessorInstrumentation.java lines 86, 92, 107). Without braces, the Prometheus exporter appends the unit to the name, e.g. otel_sdk_processor_span_processed_span_total, while the logs metric is otel_sdk_processor_log_processed_total.
What version and what artifacts are you using?
Artifacts: opentelemetry-sdk-trace
Version: main @ ce32c1205 (present since #7895)
How did you reference these artifacts? N/A (found by reading the source)
Environment
Compiler: Temurin 21
OS: N/A
Additional context
N/A
- Dominant language
- Java
- Stars
- 2.5k
- Forks
- 1k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 64
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from open-telemetry/opentelemetry-java
-
Difficulty 1/5 Under an hour Newbie friendliness 91/100
open-telemetry/opentelemetry-java#8870 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
open-telemetry/opentelemetry-java#8869 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
open-telemetry/opentelemetry-java#8866 ·
Maintainers usually reply within 2 days
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
open-telemetry/opentelemetry-java#8843 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
open-telemetry/opentelemetry-java#8688 ·
Maintainers usually reply within 2 days
All issues in open-telemetry/opentelemetry-java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Content
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
RunestoneInteractive/rs#1559 · 1 comment ·
Maintainers usually reply within 2 days
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
inu-appcenter/memorIN-backend#298 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
opendataloader-project/opendataloader-pdf#757 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
redhat-developer/intellij-quarkus#1626 ·