File tree 2 files changed +12
-0
lines changed
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;
12
12
/// The Service created by this Layer can also optionally start a new
13
13
/// performance monitoring transaction for each incoming request,
14
14
/// 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.
15
21
#[ derive( Clone , Default ) ]
16
22
pub struct SentryHttpLayer {
17
23
start_transaction : bool ,
Original file line number Diff line number Diff line change 104
104
//! onto captured events, and optionally start a new performance monitoring
105
105
//! transaction based on the incoming HTTP headers.
106
106
//!
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
+ //!
107
113
//! When combining both layers, take care of the ordering of both. For example
108
114
//! with [`tower::ServiceBuilder`], always define the `Hub` layer before the `Http`
109
115
//! one, like so:
You can’t perform that action at this time.
0 commit comments