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

View File

@@ -6,9 +6,9 @@ import (
"strings"
"time"
"github.com/ez-api/ez-api/internal/jsoncodec"
"github.com/ez-api/ez-api/internal/model"
"github.com/ez-api/ez-api/internal/util"
"github.com/ez-api/foundation/jsoncodec"
"github.com/redis/go-redis/v9"
"gorm.io/gorm"
)