跳到主要内容
Python
Go
FrontEnd
DataSource
Operation
Algorithm
DesignPatterns
AI
Culture
ReadNotes
Blog
Archive
Tags
Links
About
搜索
FastAPI
补充
补充
补充
📄️ TrackingID的设计
本文介绍如何基于 contextvars,为每次请求的完整流程都添加一个 tracking_id,并在日志中自动记录,便于全链路追踪。