-
-
Notifications
You must be signed in to change notification settings - Fork 167
Closed
Description
Environment
The bug shows up in master.
This PR is an atempt to fix the issue: #539
Steps to Reproduce
I created a server that has 2 routes with the same path, but one is a GET, and the other is a POST.
I've used sentry_actix::Sentry::with_transaction()
to create the sentry transaction from the Actix requests.
#[get("/")]
async fn testing_traces_get(_req: HttpRequest) -> Result<String, Error> {
generate_traces();
Ok("GET".into())
}
#[post("/")]
async fn testing_traces_post(_req: HttpRequest) -> Result<String, Error> {
generate_traces();
Ok("POST".into())
}
async fn pure_sentry_solution() -> io::Result<()> {
HttpServer::new(|| {
App::new()
.wrap(sentry_actix::Sentry::with_transaction())
.service(testing_traces_get)
.service(testing_traces_post)
})
.bind("127.0.0.1:3001")?
.run()
.await
}
#[tokio::main]
async fn main() -> io::Result<()> {
let _guard = sentry_init();
tracing_subscriber_init();
pure_sentry_solution().await
}
Expected Result
Sentry would show two transactions, one for each endpoint: testing_traces_get
and testing_traces_set
.
Actual Result
Sentry shows two transactions, with the same name: testing_traces_get
:
The PR mentioned above fixed the issue:
Metadata
Metadata
Assignees
Labels
No labels