日志与请求 ID
请求日志必须带哪些字段?
- 时间、级别、服务名、
request_id、方法/路径、状态、耗时、错误;
{
"ts": "2026-10-27T12:00:00.123Z",
"level": "info",
"service": "article-api",
"request_id": "9f2c1e7a5b",
"trace_id": "4b8e...",
"method": "GET",
"path": "/articles/1",
"status": 200,
"duration_ms": 12,
"error_code": "",
"error_message": ""
}