Background
Follow-up from #5182 (review).
Envelope.FromTransaction is currently split into two overloads:
public static Envelope FromTransaction(SentryTransaction transaction) =>
FromTransaction(transaction, null, null);
public static Envelope FromTransaction(
SentryTransaction transaction,
IDiagnosticLogger? logger,
IReadOnlyCollection<SentryAttachment>? attachments)
The sibling factory methods FromEvent and FromFeedback instead expose a single method with optional parameters defaulting to null:
public static Envelope FromFeedback(
SentryEvent @event,
IDiagnosticLogger? logger = null,
IReadOnlyCollection<SentryAttachment>? attachments = null,
SessionUpdate? sessionUpdate = null)
As @bitsandfoxes noted, collapsing FromTransaction into a single method with optional parameters would bring it in line with the rest.
Proposal
Replace the two FromTransaction overloads with a single method:
public static Envelope FromTransaction(
SentryTransaction transaction,
IDiagnosticLogger? logger = null,
IReadOnlyCollection<SentryAttachment>? attachments = null)
Background
Follow-up from #5182 (review).
Envelope.FromTransactionis currently split into two overloads:The sibling factory methods
FromEventandFromFeedbackinstead expose a single method with optional parameters defaulting tonull:As @bitsandfoxes noted, collapsing
FromTransactioninto a single method with optional parameters would bring it in line with the rest.Proposal
Replace the two
FromTransactionoverloads with a single method: