Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Span processor metrics use unit span instead of {span}

Open Beginner friendly
#8,867 0 comments 0 reactions 0 assignees View on GitHub

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

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from open-telemetry/opentelemetry-java

All issues in open-telemetry/opentelemetry-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.