-
-
Notifications
You must be signed in to change notification settings - Fork 223
/
sentry_span_interface.dart
85 lines (62 loc) · 2.04 KB
/
sentry_span_interface.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import 'package:meta/meta.dart';
import 'protocol.dart';
import 'tracing.dart';
/// Represents performance monitoring Span.
abstract class ISentrySpan {
/// Starts a child Span.
ISentrySpan startChild(
String operation, {
String? description,
DateTime? startTimestamp,
});
/// Sets the tag on span or transaction.
void setTag(String key, String value);
/// Removes the tag on span or transaction.
void removeTag(String key);
/// Sets extra data on span or transaction.
void setData(String key, dynamic value);
/// Removes extra data on span or transaction.
void removeData(String key);
/// Sets span timestamp marking this span as finished.
Future<void> finish({SpanStatus? status, DateTime? endTimestamp}) async {}
/// Gets span status.
SpanStatus? get status;
/// Sets span status.
set status(SpanStatus? status);
/// Gets the span context.
SentrySpanContext get context;
/// Gets the span origin
String? get origin;
/// Sets span origin.
///
/// Gets set by the SDK. It is not expected to be set manually by users.
///
/// See https://develop.sentry.dev/sdk/performance/trace-origin
set origin(String? origin);
/// Returns the end timestamp if finished
DateTime? get endTimestamp;
/// Returns the star timestamp
DateTime get startTimestamp;
/// Returns true if span is finished
bool get finished;
/// Returns the associated error
dynamic get throwable;
/// Associated the error with the span
set throwable(dynamic throwable);
@internal
SentryTracesSamplingDecision? get samplingDecision;
/// Returns the trace information that could be sent as a sentry-trace header.
SentryTraceHeader toSentryTrace();
/// Set observed measurement for this transaction.
void setMeasurement(
String name,
num value, {
SentryMeasurementUnit? unit,
});
/// Returns the baggage that can be sent as "baggage" header.
SentryBaggageHeader? toBaggageHeader();
/// Returns the trace context.
SentryTraceContextHeader? traceContext();
@internal
void scheduleFinish();
}