PR #291 · pramaan-io/pramaan-functions · merged 2026-06-10
The trace ID dies at the layer wrapper.
Story nine-eighty-eight
Traceparent silently dropped — new root, broken flow.
The fix — Incoming traceparent dies at the layer wrapper; shadowing it with a repo-root shim keeps the trace alive.
sequenceDiagram autonumber participant A as Caller participant B as Repo-root shim participant C as ADOT layer wrapper participant D as Lambda handler A->>B: event + traceparent B->>B: shadow layer (Python resolves /var/task first) B->>D: Context with traceparent B-->>C: layer wrapper bypassed
| Method | in → out | what it does |
|---|---|---|
HandlerError | (class) | signals a clean failure when the handler module can't be loaded |
modify_module_name | (module_name) → str | rewrites the handler module path so import resolves to the right place |
custom_event_context_extractor | (lambda_event) → Context | pulls traceparent out of the Lambda event and injects it into the Context — the real hero |
load_lambda_handler | () → Any | loads the actual handler function that the wrapper will invoke |
Vendors the PR #727 context extractor from the upstream ADOT layer; ships a custom event context extractor and handler loader so the repo-root shim can continue an incoming traceparent past the layer's wrapper. Temporary — delete once the pinned layer ships the fix.
| new class | signature |
|---|---|
HandlerError | (class) |
modify_module_name | (module_name) → str |
custom_event_context_extractor | (lambda_event) → Context |
load_lambda_handler | () → Any |