Skip to main content

Module tracing_interceptor

Module tracing_interceptor 

Source
Expand description

Built-in tracing support for the Client.

Enable request/response tracing by calling ClientConfig::enable_tracing or by using the with_tracing convenience function.

When tracing is enabled, every request logs the HTTP method, URL, response status, and elapsed duration at DEBUG level via the tracing crate.

§Example

use typeway_client::{ClientConfig, with_tracing};

// Option 1: builder method
let config = ClientConfig::default().enable_tracing();

// Option 2: convenience function
let config = with_tracing(ClientConfig::default());

Functions§

with_tracing
Enable built-in tracing on the given ClientConfig.