Repository navigation
Conversation
In adaptive mode, once invocations arrive faster than one a minute the extension
flushes at the start of an invocation, at most every 20 s. An environment that
then goes idle holds that telemetry until Lambda reclaims it. On SHUTDOWN the
pipelines were cancelled and the exporters given 500 ms to drain, which was
often not enough to reconnect and export, so the batch was dropped
("Exporters did not exit on channel close, cancelling.").
- ROTEL_LAMBDA_FLUSH_MODE=adaptive|after-call (default adaptive, unchanged).
after-call always exports after the response, so nothing is buffered while
the environment is frozen.
- On SHUTDOWN, force-flush logs, pipelines and exporters (bounded to 1.3 s of
the 2 s shutdown budget) before cancelling.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CBAmNpXHPvXfhFq4havtNT
Functions that already export their logs over OTLP get every line twice: once from the SDK and once from the Telemetry API function stream. When the setting is false the extension does not subscribe to function records; platform records (which drive flushing) and the extension's own logs are unchanged. Defaults to true. Also documents ROTEL_LAMBDA_FLUSH_MODE and the shutdown flush. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CBAmNpXHPvXfhFq4havtNT
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.
ROTEL_LAMBDA_FLUSH_MODE=after-callalways flushes when the invocation ends. Adaptive mode can hold telemetry while the environment is frozen. When Lambda reclaimed idle environments, we lost about 5% of spans: the shutdown phase gave exporters only 500 ms, and some buffered data never went out. The default staysadaptive.ROTEL_LAMBDA_FORWARD_FUNCTION_LOGS=falsestops the extension subscribing tofunctionTelemetry API records. Functions that already export logs over OTLP (for example through the OpenTelemetry SDK's log provider) were getting every line twice. Platform and extension records are unaffected. The default staystrue.Measured on a production-like Python Lambda (arm64) with after-call mode: 225 of 225 spans delivered, 100 of 100 in a burst test, and no shutdown flush timeouts across 38 shutdowns.
🤖 Generated with Claude Code