refactor: Update tenant ID handling across the application

This commit is contained in:
wizardchen
2025-11-25 16:30:54 +08:00
parent 9f6f5f5773
commit 64c44c9e27
78 changed files with 437 additions and 601 deletions
-7
View File
@@ -11,7 +11,6 @@ import (
"go.opentelemetry.io/otel/codes"
"github.com/Tencent/WeKnora/internal/tracing"
"github.com/Tencent/WeKnora/internal/types"
)
// Custom ResponseWriter to capture response content
@@ -36,12 +35,6 @@ func TracingMiddleware() gin.HandlerFunc {
return
}
// Get request ID as Span ID
requestID := c.GetString(string(types.RequestIDContextKey))
if requestID == "" {
requestID = c.GetHeader("X-Request-ID")
}
// Create new span
spanName := fmt.Sprintf("%s %s", c.Request.Method, c.FullPath())
ctx, span := tracing.ContextWithSpan(c.Request.Context(), spanName)