Skip to content

Count post-shutdown-dropped records as already_shutdown on processor.processed - #5509

Merged
aabmass merged 4 commits into
open-telemetry:mainfrom
cijothomas:cijothomas/processor-already-shutdown-metric
Aug 5, 2026
Merged

Count post-shutdown-dropped records as already_shutdown on processor.processed#5509
aabmass merged 4 commits into
open-telemetry:mainfrom
cijothomas:cijothomas/processor-already-shutdown-metric

Conversation

@cijothomas

Copy link
Copy Markdown
Member

Follow-up to #5472. The batch (span + log) and simple log processors dropped records silently once shut down. This counts those drops on otel.sdk.processor.{span,log}.processed with error.type=already_shutdown, which the semantic conventions define as a valid value for this metric.

Question for reviewers: SimpleSpanProcessor is intentionally left unchanged here — it has no shutdown gate, so it keeps exporting spans after shutdown() rather than dropping them, and there's nothing to count as already_shutdown. Adding a shutdown gate there would be a behavior change (post-shutdown spans would stop being exported). If there's appetite to align it, I'll do that as a separate PR — let me know.

…ady_shutdown

Batch (span+log) and simple log processors previously dropped records
silently after shutdown. Count them on otel.sdk.processor.{span,log}.processed
with error.type=already_shutdown, matching the semantic conventions and the
.NET SDK. SimpleSpanProcessor is unchanged (it has no shutdown gate).

Assisted-by: Claude Opus 4.8
@cijothomas
cijothomas requested a review from a team as a code owner August 4, 2026 23:29
@github-project-automation github-project-automation Bot moved this to Approved PRs in Python PR digest Aug 5, 2026
@DylanRussell

Copy link
Copy Markdown
Contributor

SimpleSpanProcessor is intentionally left unchanged here — it has no shutdown gate, so it keeps exporting spans after shutdown() rather than dropping them, and there's nothing to count as already_shutdown. Adding a shutdown gate there would be a behavior change (post-shutdown spans would stop being exported). If there's appetite to align it, I'll do that as a separate PR — let me know.

If the spec says to do it I'd say lets add it.. don't think it's a big deal

@cijothomas

Copy link
Copy Markdown
Member Author

SimpleSpanProcessor is intentionally left unchanged here — it has no shutdown gate, so it keeps exporting spans after shutdown() rather than dropping them, and there's nothing to count as already_shutdown. Adding a shutdown gate there would be a behavior change (post-shutdown spans would stop being exported). If there's appetite to align it, I'll do that as a separate PR — let me know.

If the spec says to do it I'd say lets add it.. don't think it's a big deal

I'll send a separate PR for that - its a breaking-behavior change, so its better on its own than clubbing with this PR which is purely self-obs metric fixes.

Signed-off-by: cijothomas <cijo.thomas@gmail.com>
@aabmass
aabmass added this pull request to the merge queue Aug 5, 2026
Merged via the queue into open-telemetry:main with commit 7bccdfc Aug 5, 2026
578 checks passed
@github-project-automation github-project-automation Bot moved this from Approved PRs to Done in Python PR digest Aug 5, 2026
@github-project-automation github-project-automation Bot moved this from In progress to Done in OTel Clients Self Observability Aug 5, 2026
@cijothomas
cijothomas deleted the cijothomas/processor-already-shutdown-metric branch August 5, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants