Commit 3176d09
refactor: replace Telemetry with typed contexts and modernize logger
- Remove Telemetry interface and StructuredLogger in favor of
OperationContext pattern
- Add StepContext, WaitForConditionContext, and WaitForCallbackContext
as type aliases
- Replace structured-logger with context-logger for better step-aware
logging
- Extract createDefaultLogger from durable-context to
utils/logger/default-logger
- Unify attempt numbering in wait-for-condition handler (remove
duplicate variables)
- Use step's built-in logger in wait-for-callback handler instead of
manual creation
- Update all function signatures from Telemetry to specific context
types
- Rename configureLogger to setCustomLogger for consistency
- Add tests for new logger utilities
- use execution_arn instead of execution_id
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
### Checklist
- [Y] I have filled out every section of the PR template
- [Y] I have thoroughly tested this change
### Testing
#### Unit Tests
Yes
Co-authored-by: Pooya Paridel <parpooya@amazon.com>1 parent a64ecbc commit 3176d09
File tree
18 files changed
+521
-496
lines changed- packages/lambda-durable-functions-sdk-js
- src
- context/durable-context
- handlers
- step-handler
- wait-for-callback-handler
- wait-for-condition-handler
- types
- utils/logger
18 files changed
+521
-496
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
Lines changed: 41 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
| 140 | + | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
| |||
428 | 429 | | |
429 | 430 | | |
430 | 431 | | |
431 | | - | |
| 432 | + | |
432 | 433 | | |
433 | 434 | | |
434 | 435 | | |
| |||
446 | 447 | | |
447 | 448 | | |
448 | 449 | | |
449 | | - | |
| 450 | + | |
450 | 451 | | |
451 | 452 | | |
452 | 453 | | |
453 | 454 | | |
454 | 455 | | |
455 | | - | |
| 456 | + | |
456 | 457 | | |
457 | 458 | | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
458 | 495 | | |
Lines changed: 21 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
40 | 55 | | |
41 | 56 | | |
42 | 57 | | |
| |||
55 | 70 | | |
56 | 71 | | |
57 | 72 | | |
| 73 | + | |
58 | 74 | | |
59 | 75 | | |
60 | 76 | | |
| |||
153 | 169 | | |
154 | 170 | | |
155 | 171 | | |
156 | | - | |
157 | | - | |
| 172 | + | |
| 173 | + | |
158 | 174 | | |
159 | 175 | | |
160 | 176 | | |
| |||
168 | 184 | | |
169 | 185 | | |
170 | 186 | | |
| 187 | + | |
171 | 188 | | |
172 | 189 | | |
173 | 190 | | |
174 | 191 | | |
175 | 192 | | |
176 | 193 | | |
177 | 194 | | |
178 | | - | |
| 195 | + | |
179 | 196 | | |
180 | 197 | | |
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
70 | 80 | | |
71 | 81 | | |
72 | 82 | | |
73 | 83 | | |
74 | 84 | | |
| 85 | + | |
75 | 86 | | |
76 | 87 | | |
77 | 88 | | |
78 | 89 | | |
79 | 90 | | |
80 | 91 | | |
81 | | - | |
| 92 | + | |
82 | 93 | | |
83 | 94 | | |
84 | 95 | | |
85 | 96 | | |
86 | 97 | | |
87 | 98 | | |
88 | | - | |
| 99 | + | |
89 | 100 | | |
90 | 101 | | |
91 | 102 | | |
| |||
Lines changed: 21 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | | - | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
161 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
162 | 171 | | |
163 | 172 | | |
164 | 173 | | |
| |||
195 | 204 | | |
196 | 205 | | |
197 | 206 | | |
| 207 | + | |
198 | 208 | | |
199 | 209 | | |
200 | 210 | | |
| |||
228 | 238 | | |
229 | 239 | | |
230 | 240 | | |
231 | | - | |
| 241 | + | |
232 | 242 | | |
233 | 243 | | |
234 | 244 | | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
242 | 248 | | |
243 | 249 | | |
244 | | - | |
| 250 | + | |
245 | 251 | | |
246 | 252 | | |
247 | | - | |
| 253 | + | |
248 | 254 | | |
249 | 255 | | |
250 | 256 | | |
| |||
309 | 315 | | |
310 | 316 | | |
311 | 317 | | |
312 | | - | |
| 318 | + | |
313 | 319 | | |
314 | 320 | | |
315 | 321 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
13 | 22 | | |
14 | 23 | | |
15 | 24 | | |
| |||
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
72 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
73 | 80 | | |
74 | 81 | | |
75 | 82 | | |
76 | 83 | | |
77 | | - | |
| 84 | + | |
78 | 85 | | |
79 | 86 | | |
80 | 87 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
70 | 79 | | |
71 | 80 | | |
72 | 81 | | |
73 | 82 | | |
| 83 | + | |
74 | 84 | | |
75 | 85 | | |
76 | 86 | | |
| |||
0 commit comments