feat: Add AddToTransactions to SentryAttachment #5182
1 issue
code-review: Found 1 issue (1 medium)
Medium
Adding parameters to public FromTransaction is a binary-breaking change - `src/Sentry/Protocol/Envelopes/Envelope.cs:340-343`
Envelope.FromTransaction is a public method whose signature changes from FromTransaction(SentryTransaction) to FromTransaction(SentryTransaction, IDiagnosticLogger?, IReadOnlyCollection<SentryAttachment>?). While source-compatible (the new parameters are optional), this is binary-breaking: assemblies compiled against the prior version will throw MissingMethodException at runtime when calling the original single-argument overload. Consumers that reference Sentry as a precompiled dependency would need to recompile. Consider preserving the original single-arg overload that delegates to the new method to maintain binary compatibility.
Duration: 36.7s · Tokens: 326.6k in / 4.1k out · Cost: $2.45
Annotations
Check warning on line 343 in src/Sentry/Protocol/Envelopes/Envelope.cs
sentry-warden / warden: code-review
Adding parameters to public FromTransaction is a binary-breaking change
`Envelope.FromTransaction` is a public method whose signature changes from `FromTransaction(SentryTransaction)` to `FromTransaction(SentryTransaction, IDiagnosticLogger?, IReadOnlyCollection<SentryAttachment>?)`. While source-compatible (the new parameters are optional), this is binary-breaking: assemblies compiled against the prior version will throw `MissingMethodException` at runtime when calling the original single-argument overload. Consumers that reference Sentry as a precompiled dependency would need to recompile. Consider preserving the original single-arg overload that delegates to the new method to maintain binary compatibility.