Repository navigation
fix(sdk): use unit {log_record} for otel.sdk.processor.log.queue.size - #5893
Open
ImamWahyudiz wants to merge 3 commits into
Open
ImamWahyudiz wants to merge 3 commits into
ImamWahyudiz wants to merge 3 commits into
Conversation
Pull request dashboard statusWaiting on maintainers · refreshed 2026-11-07 11:29 UTC Merge when ready. Status above doesn't look right?
|
herin049
approved these changes
Nov 7, 2026
Contributor
|
Changelog entry needs to match PR number. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the log queue-size metric metadata correction.
No open issues 🎉
What changed in this PR
Fixes #5888 by aligning the SDK’s log processor queue-size metric metadata with OpenTelemetry semantic conventions.
Changes:
- Changes the unit to
{log_record}and updates the description to refer to “log records.” - Adds assertions for both metadata fields in the batch log processor metrics test.
- Adds a changelog entry documenting the fix.
| File | Description |
|---|---|
opentelemetry-sdk/tests/logs/test_export.py |
Verifies the queue-size metric’s unit and description. |
opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal/_processor_metrics.py |
Corrects the log queue-size metric metadata. |
.changelog/5888.fixed |
Documents the metadata correction. |
Review effort: Balanced
Author
|
@herin049 thanks for your correction😊. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Fixes #5888
In
ProcessorMetrics.register_queue_size,otel.sdk.processor.log.queue.sizewas registered withunit="{log}"and description"The number of logs in the queue of a given instance of an SDK log processor.".Per the SDK self-observability semantic conventions, this updates:
unitfrom"{log}"to"{log_record}"descriptionto"The number of log records in the queue of a given instance of an SDK log processor."Also adds assertions for
unitanddescriptioninTestBatchLogRecordProcessor.test_metrics.Type of change
Checklist:
tox -e precommittox -e typecheck