SentrySpan constructor

SentrySpan(
  1. SentryTracer _tracer,
  2. SentrySpanContext _context,
  3. Hub _hub, {
  4. DateTime? startTimestamp,
  5. SentryTracesSamplingDecision? samplingDecision,
  6. OnFinishedCallback? finishedCallback,
  7. dynamic isRootSpan = false,
})

Implementation

SentrySpan(
  this._tracer,
  this._context,
  this._hub, {
  DateTime? startTimestamp,
  this.samplingDecision,
  OnFinishedCallback? finishedCallback,
  isRootSpan = false,
}) {
  _startTimestamp = startTimestamp?.toUtc() ?? _hub.options.clock();
  _finishedCallback = finishedCallback;
  _origin = _context.origin;
  _localMetricsAggregator = _hub.options.enableSpanLocalMetricAggregation
      ? LocalMetricsAggregator()
      : null;
  _isRootSpan = isRootSpan;
}