Skip to content

Count otel.sdk.processor.{span,log}.processed at exporter-submit time - #5472

Open
cijothomas wants to merge 6 commits into
open-telemetry:mainfrom
cijothomas:cijothomas/fix-processor-processed-boundary
Open

Count otel.sdk.processor.{span,log}.processed at exporter-submit time#5472
cijothomas wants to merge 6 commits into
open-telemetry:mainfrom
cijothomas:cijothomas/fix-processor-processed-boundary

Conversation

@cijothomas

@cijothomas cijothomas commented Jul 29, 2026

Copy link
Copy Markdown
Member

Aligns Python with the processor processed boundary clarified in open-telemetry/semantic-conventions#3902.

The otel.sdk.processor.span.processed / otel.sdk.processor.log.processed counters are currently incremented after exporter.export() returns, and an exporter failure is stamped onto this metric as error.type (the raised exception's class name). That conflates exporter outcome with processor outcome and produces unbounded error.type cardinality.

This aligns Python with the boundary clarified in semantic-conventions#3902: the processor counts a record as processed when it submits the batch to the exporter, regardless of the export result. error.type on this metric is reserved for the processor's own drop reasons (queue_full, already_shutdown); exporter success/failure is reported separately by the otel.sdk.exporter.* metrics.

Changes:

  • finish_items(count) no longer takes an error and always records success.
  • Batch and simple span/log processors count at submit-time, before export.
  • Simple log processor no longer counts a record dropped by the shutdown early-return as processed.

@cijothomas
cijothomas force-pushed the cijothomas/fix-processor-processed-boundary branch from 7cda835 to 05b0a31 Compare July 31, 2026 21:18
@cijothomas
cijothomas marked this pull request as ready for review July 31, 2026 21:21
@cijothomas
cijothomas requested a review from a team as a code owner July 31, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress
Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant