Skip to content

Commit e3d9755

Browse files
committed
add a transaction name
1 parent 648c4f4 commit e3d9755

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sentry-tower/src/http.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,11 @@ where
122122
let headers = request.headers().into_iter().flat_map(|(header, value)| {
123123
value.to_str().ok().map(|value| (header.as_str(), value))
124124
});
125+
let tx_name = format!("{} {}", request.method(), request.uri().path());
125126
let tx_ctx = sentry_core::TransactionContext::continue_from_headers(
126-
// TODO: whats the name here?
127-
"", "http", headers,
127+
&tx_name,
128+
"http.server",
129+
headers,
128130
);
129131
let transaction: sentry_core::TransactionOrSpan =
130132
sentry_core::start_transaction(tx_ctx).into();

0 commit comments

Comments
 (0)