Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sentry-tower: Use axum::MatchedPath for transaction names #570

Merged
merged 1 commit into from
Apr 24, 2023

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
12 checks passed
@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