feat: Add PreferTransactionNameProvider option#5159
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5159 +/- ##
==========================================
- Coverage 74.20% 74.14% -0.06%
==========================================
Files 501 508 +7
Lines 18113 18287 +174
Branches 3521 3577 +56
==========================================
+ Hits 13440 13559 +119
- Misses 3811 3859 +48
- Partials 862 869 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jamescrosswell
commented
Apr 23, 2026
jamescrosswell
marked this pull request as ready for review
April 23, 2026 08:09
Flash0ver
reviewed
Apr 23, 2026
Submodule modules/sentry-cocoa was not changed in this PR, so reset to main's version. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Flash0ver
reviewed
May 11, 2026
…vider Rename per code review feedback — the new name better expresses the semantic (precedence over the route-derived name) rather than the implementation detail (that the delegate is always called). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add LazyThreadSafetyMode.None (no thread contention here, avoids lock overhead) - Revert transaction.Name.Length == 0 -> == string.Empty (null-safe, consistent across TFMs) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PreferTransactionNameProvider sorts after MaxRequestBodySize (P > M), not before AutoRegisterTracing where AlwaysCallTransactionNameProvider was. Verify auto-updated the local files; committing the accepted snapshots. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Flash0ver
approved these changes
Jul 6, 2026
jamescrosswell
commented
Jul 6, 2026
| /// returns <c>null</c> or <see cref="string.Empty"/>, the routed name is preserved (or the URL-path | ||
| /// fallback applies when no route was resolved). | ||
| /// </remarks> | ||
| public bool PreferTransactionNameProvider { get; set; } |
Collaborator
Author
There was a problem hiding this comment.
Added follow up issue to complete documentation:
6 tasks
jamescrosswell
added a commit
to getsentry/sentry-docs
that referenced
this pull request
Jul 10, 2026
## DESCRIBE YOUR PR Documents the new `PreferTransactionNameProvider` option added to the ASP.NET Core integration in [getsentry/sentry-dotnet#5159](getsentry/sentry-dotnet#5159), along with the existing `TransactionNameProvider` option it modifies (which was previously undocumented). Both are added to the ASP.NET Core section of the .NET **Configuration Options** page. - Document `TransactionNameProvider` (callback used to name transactions for requests that don't resolve to a route template) - Document `PreferTransactionNameProvider` (bool, default `false`) — controls whether the provider runs on every request or only as a route-resolution fallback closes: getsentry/sentry-dotnet#5349 > **Note for reviewers:** `availableSince` is set to `6.7.0` (the next unreleased minor at time of writing). Assumes this matches the actual release that ships [getsentry/sentry-dotnet#5159](getsentry/sentry-dotnet#5159). ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [x] Other deadline: Release of `sentry-dotnet v6.7.0` - [ ] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [x] Checked Vercel preview for correctness, including links - [x] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 tasks
This was referenced Jul 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #5123