Module axum

Source
Expand description

This module contains types which can be used as [axum] layers to produce OpenTelemetry compatible HTTP spans.

These spans include a wide variety of fields / attributes defined by the semantic conventions specification. A few examples are:

  • http.request.method
  • http.response.status_code
  • user_agent.original

Structs§

HeaderExtractor
Extracts the TextMapPropagator to access trace parent information in HTTP headers.
HeaderInjector
Injects the TextMapPropagator to propagate trace parent information in HTTP headers.
ResponseFuture
This future contains the inner service future and the current [Span].
TraceLayer
A Tower Layer which decorates TraceService.
TraceService
A Tower [Service] which injects Span Context into HTTP Response Headers.

Enums§

ServerHostError
Errors which can be encountered when extracting the server host from a [Request].

Traits§

RequestExt
This trait provides various helper functions to extract data from a HTTP [Request].
SpanExt
This trait provides various helper functions to create a [Span] out of an HTTP [Request].