File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,12 @@ use tower_service::Service;
1212/// The Service created by this Layer can also optionally start a new
1313/// performance monitoring transaction for each incoming request,
1414/// continuing the trace based on incoming distributed tracing headers.
15+ ///
16+ /// The created transaction will automatically use the request URI as its name.
17+ /// This is sometimes not desirable in case the request URI contains unique IDs
18+ /// or similar. In this case, users should manually override the transaction name
19+ /// in the request handler using the [`Scope::set_transaction`](sentry_core::Scope::set_transaction)
20+ /// method.
1521#[ derive( Clone , Default ) ]
1622pub struct SentryHttpLayer {
1723 start_transaction : bool ,
Original file line number Diff line number Diff line change 104104//! onto captured events, and optionally start a new performance monitoring
105105//! transaction based on the incoming HTTP headers.
106106//!
107+ //! The created transaction will automatically use the request URI as its name.
108+ //! This is sometimes not desirable in case the request URI contains unique IDs
109+ //! or similar. In this case, users should manually override the transaction name
110+ //! in the request handler using the [`Scope::set_transaction`](sentry_core::Scope::set_transaction)
111+ //! method.
112+ //!
107113//! When combining both layers, take care of the ordering of both. For example
108114//! with [`tower::ServiceBuilder`], always define the `Hub` layer before the `Http`
109115//! one, like so:
You can’t perform that action at this time.
0 commit comments