Repository navigation
feat!: Envelope.FromEvent, FromFeedback and FromTransaction now take the logger as their last parameter - #5669
Merged
Conversation
…logger last Move the IDiagnosticLogger parameter after attachments (and sessionUpdate) so the parameters that shape the envelope come first, consistently across all three public factory methods. Closes #5379 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
@ric-oliv even though this technically touches public types and is a breaking change, in practice I doubt many SDK users are using these types (you can see there were no changes to any of our samples projects as a result of the change, for example). |
ric-oliv
approved these changes
Oct 5, 2026
Member
|
Looks good! |
3 tasks done
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.
Changelog Entry
Envelope.FromEvent,Envelope.FromFeedbackandEnvelope.FromTransactionnow take theIDiagnosticLoggeras their last parameter, afterattachments(andsessionUpdate). This only affects code that creates envelopes directly and passes these arguments positionally; those calls no longer compile, so reorder the arguments or pass them by name.Summary
Moves the
IDiagnosticLoggerparameter of the publicEnvelopefactory methods to the end, so the parameters that affect what goes into the envelope come first:The issue only asks for
attachmentsto come beforelogger. Puttingloggerlast in all three methods, aftersessionUpdatetoo, gives every factory the same shape.A positional call written against the old order can't silently bind to the wrong parameter: the argument types no longer line up, so it fails to compile.
Notes
Envelope.FromEvent(new SentryEvent()), so it is unaffected.ApiApprovalTests.Run.Net4_8.verified.txtcan't be regenerated on macOS, so it was edited by hand with the same line changes the other TFMs produced.Closes #5379
🤖 Generated with Claude Code