Skip to content

fix(sdk): use unit {log_record} for otel.sdk.processor.log.queue.size - #5893

Open
ImamWahyudiz wants to merge 3 commits into
open-telemetry:mainfrom
ImamWahyudiz:fix/processor-log-queue-size-unit-5888
Open

ImamWahyudiz wants to merge 3 commits into
open-telemetry:mainfrom
ImamWahyudiz:fix/processor-log-queue-size-unit-5888

Conversation

@ImamWahyudiz

Copy link
Copy Markdown

Description

Fixes #5888

In ProcessorMetrics.register_queue_size, otel.sdk.processor.log.queue.size was registered with unit="{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:

  • unit from "{log}" to "{log_record}"
  • description to "The number of log records in the queue of a given instance of an SDK log processor."

Also adds assertions for unit and description in TestBatchLogRecordProcessor.test_metrics.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I am a human and not a bot
  • I have run tox -e precommit
  • I have run tox -e typecheck
  • I have run the relevant tests and linting tox environments

@ImamWahyudiz
ImamWahyudiz requested a review from a team as a code owner November 6, 2026 19:50
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Waiting on maintainers · refreshed 2026-11-07 11:29 UTC

Merge when ready.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

@herin049

herin049 commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Changelog entry needs to match PR number.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@ImamWahyudiz

ImamWahyudiz commented Nov 7, 2026 •

Copy link
Copy Markdown
Author

@herin049 thanks for your correction😊.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Approved PRs

Development

Successfully merging this pull request may close these issues.

otel.sdk.processor.log.queue.size uses unit "{log}" instead of "{log_record}"

3 participants