You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/lambda-features/durable-functions.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ The Durable Execution SDK provides a `context.logger` instance that automaticall
39
39
40
40
For the best experience, set the Logger on the durable context. This gives you structured JSON logging with automatic log deduplication during replays:
41
41
42
-
```python hl_lines="5 11 14 22" title="Integrating Logger with Durable Functions"
42
+
```python hl_lines="5 8 12 15" title="Integrating Logger with Durable Functions"
@@ -68,7 +68,7 @@ Tracer works with Durable Functions. Each execution creates trace segments.
68
68
???+ note "Trace continuity"
69
69
Due to the replay mechanism, traces may be interleaved. Each execution (including replays) creates separate trace segments. Use the `execution_arn` to correlate traces.
70
70
71
-
```python hl_lines="5 9" title="Using Tracer with Durable Functions"
71
+
```python hl_lines="5-6 9-10" title="Using Tracer with Durable Functions"
@@ -84,10 +84,13 @@ Metrics work with Durable Functions, but be aware that **metrics may be emitted
84
84
85
85
The `@idempotent` decorator integrates with Durable Functions and is **replay-aware**. It's useful for protecting the Lambda handler entry point, especially for Event Source Mapping (ESM) invocations like SQS, Kinesis, or DynamoDB Streams.
86
86
87
-
```python hl_lines="9 15" title="Using Idempotency with Durable Functions"
87
+
```python hl_lines="8 15" title="Using Idempotency with Durable Functions"
The `@idempotent` decorator must be placed **above**`@durable_execution`. This ensures the idempotency check runs first, preventing duplicate executions before the durable workflow begins. Reversing the order would cause the durable execution to start before the idempotency check, defeating its purpose.
93
+
91
94
**When to use Powertools Idempotency:**
92
95
93
96
- Protecting the Lambda handler entry point from duplicate invocations
0 commit comments