otel.sdk.processor.{span,log}.queue.capacity uses synchronous UpDownCounter recorded once in __init__
Maintainers usually reply within 2 days
Nobody has claimed this yet.
- #5902 by @2Zest — closed without merging
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- observability-sre
Research direction
Read opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal/_processor_metrics.py, especially ProcessorMetrics.__init__ and register_queue_size. Check how the existing queue size observable callback is registered and compare it with the synchronous capacity measurements. Done means both span and log queue capacity metrics use observable callbacks and remain available after the meter provider is registered and across Delta collection cycles.
Written by the indexing model from the issue text.
Description
Description
In ProcessorMetrics.__init__, otel.sdk.processor.span.queue.capacity and otel.sdk.processor.log.queue.capacity are created as synchronous UpDownCounter instruments and recorded once during __init__:
This causes queue.capacity to be missing in two common scenarios:
- When
BatchSpanProcessororBatchLogRecordProcessoris constructed beforemetrics.set_meter_provider(...)is called (including inopentelemetry-instrumentauto-instrumentation),get_meter_provider()returns_ProxyMeterProvider, whose_ProxyUpDownCounter.add()is a no-op and does not replay measurements when the realMeterProvideris registered. - When the
MetricReaderuses Delta aggregation temporality forUpDownCounter, the single.add(capacity)call in__init__is only reported on the first collection cycle and is missing from all subsequent collections.
Expected behavior
otel.sdk.processor.span.queue.capacity and otel.sdk.processor.log.queue.capacity should be registered as asynchronous ObservableUpDownCounter callbacks (matching register_queue_size on lines 97-117).
- Dominant language
- Python
- Stars
- 2.7k
- Forks
- 1.1k
- Avg merge
- 4d 13m
- Merged PRs (30d)
- 38
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
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-python
-
opentelemetry-configuration: OTLP HTTP exporter does not validate TLS files exist at startupPossibly taken @Dotify71 claimed this 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
open-telemetry/opentelemetry-python#5928 ·
Maintainers usually reply within 2 days
-
W3CBaggagePropagator drops a list-member over 4096 bytes that W3C Baggage requires it to propagatePossibly taken @codedbyadiiii claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
open-telemetry/opentelemetry-python#5913 ·
Maintainers usually reply within 2 days
-
Prometheus map_unit incorrectly normalizes percent ratio units such as %/sPossibly taken @knowprasad claimed this 10 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
open-telemetry/opentelemetry-python#5875 · 1 comment · 1 reaction ·
Maintainers usually reply within 2 days
-
OTLP HTTP exporter reports a 3xx response as a successful export, so redirected batches are dropped without any logPossibly taken @d4rshnn claimed this 18 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-python#5865 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
open-telemetry/opentelemetry-python#5700 · 1 comment ·
Maintainers usually reply within 2 days
All issues in open-telemetry/opentelemetry-python
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
docling-project/docling-pipelines#669 ·
Maintainers usually reply within 1 day
-
blocked kind/enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
opendatahub-io/agent-eval-harness#329 · 2 comments · 1 reaction ·
-
cc_wrapper crashes with ValueError on Windows when a path is on another drivePossibly taken @TrapsterDK claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
tweag/rules_haskell#2492 ·
Maintainers usually reply within 1 day