SentryTransaction constructor
SentryTransaction(
- SentryTracer _tracer, {
- SentryId? eventId,
- DateTime? timestamp,
- String? platform,
- String? serverName,
- String? release,
- String? dist,
- String? environment,
- String? transaction,
- dynamic throwable,
- Map<
String, String> ? tags, - Map<
String, dynamic> ? extra, - SentryUser? user,
- Contexts? contexts,
- List<
Breadcrumb> ? breadcrumbs, - SdkVersion? sdk,
- SentryRequest? request,
- String? type,
- Map<
String, SentryMeasurement> ? measurements, - SentryTransactionInfo? transactionInfo,
Implementation
SentryTransaction(
this._tracer, {
SentryId? eventId,
DateTime? timestamp,
String? platform,
String? serverName,
String? release,
String? dist,
String? environment,
String? transaction,
dynamic throwable,
Map<String, String>? tags,
Map<String, dynamic>? extra,
SentryUser? user,
Contexts? contexts,
List<Breadcrumb>? breadcrumbs,
SdkVersion? sdk,
SentryRequest? request,
String? type,
Map<String, SentryMeasurement>? measurements,
SentryTransactionInfo? transactionInfo,
}) : super(
eventId: eventId,
timestamp: timestamp ?? _tracer.endTimestamp,
platform: platform,
serverName: serverName,
release: release,
dist: dist,
environment: environment,
transaction: transaction ?? _tracer.name,
throwable: throwable ?? _tracer.throwable,
tags: tags ?? _tracer.tags,
extra: extra ?? _tracer.data,
user: user,
contexts: contexts,
breadcrumbs: breadcrumbs,
sdk: sdk,
request: request,
type: _type,
) {
startTimestamp = _tracer.startTimestamp;
final spanContext = _tracer.context;
spans = _tracer.children;
this.measurements = measurements ?? {};
this.contexts.trace = spanContext.toTraceContext(
sampled: _tracer.samplingDecision?.sampled,
status: _tracer.status,
);
this.transactionInfo = transactionInfo ??
SentryTransactionInfo(_tracer.transactionNameSource.toStringValue());
}