Skip to content

Commit

Permalink
Fix doc error.
Browse files Browse the repository at this point in the history
  • Loading branch information
bryn committed Apr 22, 2022
1 parent 5017c68 commit 4b15150
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions apollo-router-core/src/layers/instrument.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
//!
//! Using ServiceBuilderExt:
//! ```rust
//! use tower::ServiceBuilder;
//! use tracing::info_span;
//! use apollo_router_core::ServiceBuilderExt;
//!
//! # use tower::ServiceBuilder;
//! # use tower_service::Service;
//! # use tracing::info_span;
//! # use apollo_router_core::ServiceBuilderExt;
//! # fn test<T>(service: impl Service<T>) {
//! let instrumented = ServiceBuilder::new()
//! .instrument(|_request| info_span!("query_planning"))
//! .service(service);
//! # }
//! ```
//! Now calls to the wrapped service will be wrapped in a span. You can attach attributes to the span from the request.
//!
Expand Down

0 comments on commit 4b15150

Please sign in to comment.