Skip to content

Conversation

Turbo87
Copy link
Contributor

@Turbo87 Turbo87 commented Apr 24, 2023

If the axum-matched-path feature of sentry-tower is used, it will enable the corresponding matched-path feature of axum and use the MatchedPath request extension to generate the transaction name. As before, the HTTP method is also still included in the transaction name.

Resolves #541

/cc @Swatinem

If the `axum-matched-path` feature of `sentry-tower` is used, it will enable the corresponding `matched-path` feature of `axum` and use the `MatchedPath` request extension to generate the transaction name. As before, the HTTP method is also still included in the transaction name.
@Turbo87
Copy link
Contributor Author

Turbo87 commented Apr 24, 2023

for context: this is supposed to replace https://github.com/rust-lang/crates.io/blob/8b72b4ad67bab12574f7eb8704f8997c047054f1/src/middleware/sentry.rs, but it has the advantage that the trace_sampler will get the MatchedPath value too, instead of the full URL, which makes it easier to make sampling decisions based on the URL.

@Turbo87 Turbo87 changed the title sentry-tower: Use MatchedPath for transaction names sentry-tower: Use axum::MatchedPath for transaction names Apr 24, 2023
@Swatinem Swatinem merged commit cf7d956 into getsentry:master Apr 24, 2023
@Swatinem
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Axum integration

2 participants