Commit 65bad8f
authored
Fix/trace id align (#637)
* feat: Propagate trace_id to scheduled messages and improve context robustness
- Propagate from request context to to align logs across asynchronous operations.
- Update context getter functions (, , , ) to return default empty/production values instead of for improved robustness.
* Add scheduler total duration metric and keep context defaults
* Fix: Ruff UP038 in dispatcher.py
---------
Co-authored-by: [email protected] <>1 parent 8be6f34 commit 65bad8f
File tree
2 files changed
+37
-0
lines changed- src/memos/mem_scheduler
- task_schedule_modules
2 files changed
+37
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
664 | 665 | | |
665 | 666 | | |
666 | 667 | | |
| 668 | + | |
| 669 | + | |
667 | 670 | | |
668 | 671 | | |
669 | 672 | | |
670 | 673 | | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
671 | 678 | | |
672 | 679 | | |
673 | 680 | | |
| |||
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
213 | 216 | | |
214 | 217 | | |
215 | 218 | | |
| |||
243 | 246 | | |
244 | 247 | | |
245 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
246 | 252 | | |
247 | 253 | | |
248 | 254 | | |
| |||
423 | 429 | | |
424 | 430 | | |
425 | 431 | | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
426 | 456 | | |
427 | 457 | | |
428 | 458 | | |
| |||
0 commit comments