SentryEnvelopeItem.fromTransaction constructor
SentryEnvelopeItem.fromTransaction(
- SentryTransaction transaction
Creates a SentryEnvelopeItem which sends SentryTransaction.
Implementation
factory SentryEnvelopeItem.fromTransaction(SentryTransaction transaction) {
final header = SentryEnvelopeItemHeader(
SentryItemType.transaction,
contentType: 'application/json',
);
return SentryEnvelopeItem(
header, () => utf8JsonEncoder.convert(transaction.toJson()),
originalObject: transaction);
}