pub trait ReqwestOtelSpanBackend {
    // Required methods
    fn on_request_start(req: &Request, extension: &mut Extensions) -> Span;
    fn on_request_end(
        span: &Span,
        outcome: &Result<Response>,
        extension: &mut Extensions
    );
}
Expand description

ReqwestOtelSpanBackend allows you to customise the span attached by TracingMiddleware to incoming requests.

Check out reqwest_otel_span documentation for examples.

Required Methods§

source

fn on_request_start(req: &Request, extension: &mut Extensions) -> Span

Initialized a new span before the request is executed.

source

fn on_request_end( span: &Span, outcome: &Result<Response>, extension: &mut Extensions )

Runs after the request call has executed.

Object Safety§

This trait is not object safe.

Implementors§