feat: Emit worker pool size as a DEBUG log event during init on Lambda Managed Instances - #646
Open
vip-amzn wants to merge 1 commit into
Open
feat: Emit worker pool size as a DEBUG log event during init on Lambda Managed Instances#646vip-amzn wants to merge 1 commit into
vip-amzn wants to merge 1 commit into
Conversation
…a Managed Instances
vip-amzn
force-pushed
the
runtime-worker-count-observability
branch
from
September 2, 2026 14:08
892cdbd to
73d1189
Compare
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.
Description
On Lambda Managed Instances,
the runtime sizes and spawns a worker pool during initialization to handle
multiple concurrent invocations per execution environment. Today there is no
way to observe the effective pool size: it can be influenced by configuration,
but nothing confirms what the runtime actually resolved.
This change adds a one-time structured JSON log event, emitted at DEBUG level
during runtime initialization, reporting the resolved worker pool size and the
maximum concurrency the execution environment supports. Both values are
included so the worker count is not mistaken for the supported concurrency.
Example (visible when the function's application log level is DEBUG or lower):
{ "timestamp": "...", "level": "DEBUG", "message": { "event": "runtime_worker_pool_initializing", "workerCount": 17, "executionEnvironmentMaxConcurrency": 34 } }Design notes:
so it only appears when the application log level is set to DEBUG or lower.
Default configurations see no new log lines and no added CloudWatch cost.
already initialized during bootstrap.
path is untouched.
(e.g. filter message.event = "runtime_worker_pool_initializing").
See also: Java runtime for Lambda Managed Instances
Testing
correct schema and values, suppressed at INFO and above, and not emitted on
the single-concurrency path.
execution environment at DEBUG, never appears at INFO or above, and repeated
sequential/concurrent invocations neither re-emit the event nor affect
normal invocation logs.