Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var WithInternalPathFilter = otelhttp.WithFilter( filters.None( filters.Path("/metrics"), filters.Path("/health"), ), )
WithInternalPathFilter is the default tracing filter passed to the Middleware. It filters out /metrics and /health requests.
Functions ¶
func Middleware ¶
Middleware configures the otelhttp.NewHandler and returns a middleware is compatible with the chi router interface.
Example:
r := chi.NewRouter() r.Use(otel.Middleware("Server"))
The most common options to pass will be the otelhttp.WithFilter and otelhttp.WithSpanNameFormatter ¶
When no options are passed a default filter for /metrics and /health is used.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.