feat(telemetry): implement request tracing identifier

Introduce a middleware layer to attach a unique identifier to each HTTP request for observability purposes. The identifier is propagated via the X-Request-ID header, allowing for correlation of logs and events across distributed system components.
This commit is contained in:
zenfun
2025-12-13 23:49:58 +08:00
parent a6b4306d08
commit 531ac6e5a8
8 changed files with 30 additions and 224 deletions

1
go.mod
View File

@@ -4,6 +4,7 @@ go 1.24.5
require (
github.com/bytedance/sonic v1.14.0
github.com/ez-api/foundation v0.0.0
github.com/gin-gonic/gin v1.11.0
github.com/redis/go-redis/v9 v9.17.2
github.com/rs/zerolog v1.34.0