Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OtelRequestResponseLog ¶
OtelRequestResponseLog wraps an http.Handler and logs every request and response to stdout, and records request/response attributes on the current OpenTelemetry span. Use inside otelhttp so the span is in context: otelhttp.NewHandler(OtelRequestResponseLog(handler), "ipam").
func Recover ¶
Recover wraps an http.Handler and recovers from panics: logs the panic and stack, returns 500.
func RequestLog ¶
RequestLog wraps an http.Handler and logs each request (method, path, status, duration) to stdout. Use with OpenTelemetry: otelhttp.NewHandler(RequestLog(handler), "service name").
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.