expose otel trace context from snapshots
Merged
DA
3mo ago+926+926+012345678901234567890123456789-26-26-01234567890123456789
Summary by cubic
Adds traceContext() (JS) / trace_context() (Python) to all snapshot types so manual handlers can nest host tracing under the suspension's span when Monty instrumentation is enabled.
- Returns the OTel Context captured at
feedStart/feed_start(orloadSnapshot/load_snapshotwhen restoring), with the suspension's span set when Monty tracing is active; composition failures fall back to the captured context, with JS reporting the failure viadiag.warn. - Without Monty tracing, returns the captured context unchanged.
- Context is never serialized; restoring snapshots captures the restoring caller's context.
- Calling after resume throws; contexts obtained earlier remain usable but don't keep the span open.
- Python requires
opentelemetry-api; calling without it raisesImportError. resumeAuto()/resume_auto()already activate the suspension span around callbacks.