Skip to content

Commit 645cb83

Browse files
author
Alex Wang
committed
update doc str
1 parent 45a6840 commit 645cb83

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

packages/aws-durable-execution-sdk-python-examples/src/otel/otel_logger_example.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
"""Demonstrates OTel-enriched logging in a durable execution.
22
3-
The DurableExecutionOtelPlugin wraps the execution logger (enrich_logger=True
4-
by default) so every log line emitted through context.logger / step_context.logger
5-
is automatically enriched with the active OpenTelemetry trace context
6-
(otel.trace_id, otel.span_id, otel.trace_sampled). This lets logs correlate to
7-
the spans the plugin emits without any user code changes.
3+
The DurableExecutionOtelPlugin installs a logging filter on the root logger
4+
(enrich_logger=True by default) when the plugin is constructed. The filter
5+
stamps the active OpenTelemetry trace context (otel_trace_id, otel_span_id,
6+
otel_trace_sampled) onto every log record that flows through the root handler.
7+
This includes logs emitted via context.logger / step_context.logger as well as
8+
direct logging.getLogger() calls and third-party library logs, so logs
9+
correlate to the spans the plugin emits without any user code changes.
810
911
Logs emitted:
1012
- at the top level correlate to the invocation span

0 commit comments

Comments
 (0)