feat(sdk): POC emit otel.sdk.component.shutdown event from BatchLogProcessor and OTLP gRPC log exporter#3552
Draft
cijothomas wants to merge 11 commits into
Draft
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3552 +/- ##
=======================================
- Coverage 83.0% 83.0% -0.1%
=======================================
Files 130 130
Lines 27952 28015 +63
=======================================
+ Hits 23210 23262 +52
- Misses 4742 4753 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Jun 23, 2026
Open
…d OTLP gRPC log exporter
…antees single call)
- Move emission from BatchLogProcessor + TonicLogsClient to LoggerProvider.shutdown_with_timeout (one event per provider). - Use error.type (absent=success, 'timeout'/'failed' on failure) instead of custom otel.component.shutdown.result enum. - otel.component.type = 'logger_provider'. - Revert batch_log_processor.rs and tonic/logs.rs to main (no per-component emission).
Each provider now emits otel.sdk.component.shutdown with: - otel.component.type: tracer_provider / meter_provider / logger_provider - otel.component.name: <type>/<N> - error.type: absent on success, 'timeout'/'failed' on failure - otel.component.shutdown.duration: wall-clock seconds
cijothomas
force-pushed
the
cijothomas/poc-sdk-shutdown-event
branch
from
June 26, 2026 13:48
b1a7fad to
df1dda1
Compare
- In-tree semconv registry (semconv/) declaring the shutdown event
with attributes (local until semconv#3723 is released upstream).
- Dedicated live-check example that creates a LoggerProvider, calls
shutdown(), and lets the event flow to weaver via OTLP.
- Workflow using weaver-live-check-{start,stop} composite actions
with fail-on: violation.
Second call to shutdown_with_timeout now returns AlreadyShutdown immediately without emitting an event, matching Logger/TracerProvider.
|
Thank you for your contribution! This PR has been automatically marked as stale because it has not had activity in the last 14 days. This may be due to a delay in review on our side or awaiting a response from you; either is fine, and we appreciate your patience. It will be closed in 14 days if no further activity occurs. Pushing a new commit or leaving a comment will remove the stale label and keep the PR open. |
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.
POC validating open-telemetry/semantic-conventions#3723 (
otel.sdk.component.shutdownevent) end-to-end in Rust. Cross-language companion to the .NET POC (open-telemetry/opentelemetry-dotnet#7406).Emits one
otel.sdk.component.shutdownevent per provider instance whenshutdown()ends. All three providers are covered.Event shape
otel.component.typelogger_provider/tracer_provider/meter_providerotel.component.name<type>/N(e.g.logger_provider/0)error.typetimeoutorfailedon failureotel.component.shutdown.durationSeverity: INFO when successful, WARN when
error.typepresent.Scope
LoggerProvider::shutdown_with_timeout(opentelemetry-sdk/src/logs/logger_provider.rs)SdkTracerProvider::shutdown_with_timeout(opentelemetry-sdk/src/trace/provider.rs)SdkMeterProvider::shutdown_with_timeout(opentelemetry-sdk/src/metrics/meter_provider.rs)Disposeroutes throughShutdownso the event fires on Drop-initiated cleanup too (Rust: explicitshutdown()only; Drop is a safety net).otel_info!/otel_warn!with quoted-key support (feat(api): accept quoted-key fields in otel logging macros #3567).semconv/) + weaver live-check workflow validates the event against the registry in CI.Out of scope
failed).