Repository navigation
Conversation
Keep Spring requests and event capture running when a transaction name provider throws. Use an unlabeled custom transaction as the privacy-safe fallback and continue to later providers when resolving combined names. Apply the same behavior across the Spring, Spring Jakarta, and Spring 7 integrations. Co-Authored-By: Claude <noreply@anthropic.com>
📲 Install BuildsAndroid
|
…ndling-spring-transaction-name-provider
This branch has not been deployed
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.
📜 Description
Handle exceptions from Spring
TransactionNameProvidercallbacks across event capture, request processing, tracing, and combined providers. Nonfatal failures use<unlabeled transaction>with a custom source, while fatal JVM errors continue to propagate.Combined providers continue trying later providers after a failure. If none succeeds, they use the safe fallback; ordinary unresolved providers still preserve the existing null result.
The implementation is mirrored across Spring, Spring Jakarta, and Spring 7.
💡 Motivation and Context
A custom transaction-name provider can currently interrupt request processing or event capture. Returning a fixed fallback avoids retaining a partially mutated or sensitive transaction name while keeping the host request available.
The shared
TransactionNameProviderUtilsclasses are public only for cross-package integration use and are annotated@ApiStatus.Internal. Provider-list behavior remains private toCombinedTransactionNameProviderbecause it has no other production callers.💚 How did you test it?
./gradlew spotlessApply apiDump./gradlew :sentry-spring:test :sentry-spring-jakarta:test :sentry-spring-7:test./gradlew :sentry-spring:apiCheck :sentry-spring-jakarta:apiCheck :sentry-spring-7:apiCheck📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
None.