Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultLoggerTracer = func(c *gin.Context) (fields []ull.Field) { if trace.SpanFromContext(c.Request.Context()).SpanContext().IsValid() { fields = append(fields, ull.Any("trace_id", trace.SpanFromContext(c.Request.Context()).SpanContext().TraceID().String()), ) } return fields }
Functions ¶
func LoggerHandlerFunc ¶
func WithTraceProvider ¶
func WithTraceProvider(tp *tracesdk.TracerProvider) gin.HandlerFunc
WithTraceProvider 参考文档 https://github.com/open-telemetry/opentelemetry-go/edit/main/example/jaeger/main.go
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.