Count post-shutdown-dropped records as already_shutdown on processor.processed - #5509
Conversation
…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
Assisted-by: Claude Opus 4.8
Assisted-by: Claude Opus 4.8
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>
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}.processedwitherror.type=already_shutdown, which the semantic conventions define as a valid value for this metric.Question for reviewers:
SimpleSpanProcessoris intentionally left unchanged here — it has no shutdown gate, so it keeps exporting spans aftershutdown()rather than dropping them, and there's nothing to count asalready_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.