Package-Level Type Names (total 3, in which 2 are exported)
/* sort exporteds by: | */
Handler is an [http.Handler] that traces incoming HTTP requests using
[traces.Tracer].
By default, incoming trace context headers are ignored so untrusted clients
cannot forge trace IDs or force sampling; call [Handler.WithExtract] to opt
in to header extraction on internal or trusted endpoints. The server span
reference is propagated via [traces.NewContext], and the span is renamed
once the route pattern is known after the wrapped handler returns. Response
writing is wrapped with [httpsnoop.Wrap] so optional [http.ResponseWriter]
interfaces are preserved.attrsfunc(*http.Request) []traces.Attrextractfunc(get func(key string) []string) traces.SpanReffilterfunc(*http.Request) boolnexthttp.Handlerroutefunc(*http.Request) stringspanNamefunc(r *http.Request, route string) stringtracer*traces.Tracer ServeHTTP implements the [http.Handler] interface. WithAttrs returns a [Handler] using f to attach additional start-time
attributes for each request. If f is nil, only default attributes are added. WithExtract returns a [Handler] using f to extract the parent [traces.SpanRef]
from incoming request headers (for example [traceparent.Extract]). If f is nil,
incoming headers are ignored. WithFilter returns a [Handler] that only traces requests for which f returns
true. Filtered-out requests are passed directly to the wrapped handler
without creating a span. If f is nil, all requests are traced. WithRoute returns a [Handler] using f to extract the low-cardinality route
pattern after the inner handler runs. If f is nil, it restores deriving the
route from [http.Request.Pattern]. WithSpanName returns a [Handler] using f to compute the final span name from
the request and resolved route. If f is nil, it restores the default
"METHOD route" (or "METHOD") naming.
*Handler : net/http.Handler
func NewHandler(tr *traces.Tracer, next http.Handler) *Handler
func (*Handler).WithAttrs(f func(*http.Request) []traces.Attr) *Handler
func (*Handler).WithExtract(f func(get func(key string) []string) traces.SpanRef) *Handler
func (*Handler).WithFilter(f func(*http.Request) bool) *Handler
func (*Handler).WithRoute(f func(*http.Request) string) *Handler
func (*Handler).WithSpanName(f func(r *http.Request, route string) string) *Handler
Transport is an [http.RoundTripper] that traces outgoing HTTP requests.
By default, trace context headers are not injected so internal trace IDs are
not leaked to third-party endpoints; call [Transport.WithInject] to opt in
for internal or trusted downstream services.
Client spans end when the response body reaches EOF or is closed, or at
response headers for nil/empty bodies, HEAD requests, errors, and 101
Switching Protocols responses.attrsfunc(*http.Request) []traces.Attrbasehttp.RoundTripperfilterfunc(*http.Request) boolinjectfunc(ref traces.SpanRef, set func(key, value string))spanNamefunc(*http.Request) stringtracer*traces.Tracer RoundTrip implements the [http.RoundTripper] interface. WithAttrs returns a [Transport] using f to attach additional start-time
attributes for each outgoing request. If f is nil, only default attributes
are added. WithFilter returns a [Transport] that only traces requests for which f
returns true. Filtered-out requests are passed directly to the wrapped
transport without creating a span or injecting trace headers. If f is nil,
all requests are traced. WithInject returns a [Transport] using f to inject [traces.SpanRef] into
outgoing request headers (for example [traceparent.Inject]). If f is nil, no
trace headers are injected. WithSpanName returns a [Transport] using f to compute the span name for each
outgoing request. If f is nil, it restores using the HTTP request method.
*Transport : net/http.RoundTripper
func NewTransport(tr *traces.Tracer, base http.RoundTripper) *Transport
func (*Transport).WithAttrs(f func(*http.Request) []traces.Attr) *Transport
func (*Transport).WithFilter(f func(*http.Request) bool) *Transport
func (*Transport).WithInject(f func(ref traces.SpanRef, set func(key, value string))) *Transport
func (*Transport).WithSpanName(f func(*http.Request) string) *Transport