Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPHandler ¶
HTTPHandler returns an HTTP middleware that creates OpenTelemetry spans for incoming requests. It extracts trace context from request headers to support distributed tracing, records the HTTP method, URL, and status code, and marks spans as errors for 4xx/5xx responses.
func HTTPHandlerFunc ¶
func HTTPHandlerFunc(tracer trace.Tracer) func(http.HandlerFunc) http.HandlerFunc
HTTPHandlerFunc is like HTTPHandler but wraps http.HandlerFunc directly. This is useful for routers that use HandlerFunc.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.