Enha: tracing [WIP]
This commit is contained in:
		| @@ -36,7 +36,11 @@ func NewTracerProvider(exp sdktrace.SpanExporter) *sdktrace.TracerProvider { | ||||
|  | ||||
| // OtelMiddleware wraps the provided http.Handler with OpenTelemetry tracing. | ||||
| func OtelMiddleware(handler http.Handler) http.Handler { | ||||
| 	return otelhttp.NewHandler(handler, "http.server") | ||||
| 	return otelhttp.NewHandler(handler, "http.server", | ||||
| 		otelhttp.WithSpanNameFormatter(func(operation string, r *http.Request) string { | ||||
| 			return r.URL.Path | ||||
| 		}), | ||||
| 	) | ||||
| } | ||||
|  | ||||
| func InitTracer() func() { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder