-
Notifications
You must be signed in to change notification settings - Fork 333
Expand file tree
/
Copy pathMutableSpan.java
More file actions
84 lines (57 loc) · 2.11 KB
/
MutableSpan.java
File metadata and controls
84 lines (57 loc) · 2.11 KB
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
package datadog.trace.api.interceptor;
import java.util.Map;
public interface MutableSpan {
/**
* @return Start time with nanosecond scale, but millisecond resolution.
*/
long getStartTime();
/**
* @return Duration with nanosecond scale.
*/
long getDurationNano();
CharSequence getOperationName();
MutableSpan setOperationName(final CharSequence serviceName);
String getServiceName();
MutableSpan setServiceName(final String serviceName);
CharSequence getResourceName();
MutableSpan setResourceName(final CharSequence resourceName);
Integer getSamplingPriority();
/**
* @param newPriority
* @return
* @deprecated Use {@link io.opentracing.Span#setTag(String, boolean)} instead using either tag
* names {@link datadog.trace.api.DDTags#MANUAL_KEEP} or {@link
* datadog.trace.api.DDTags#MANUAL_DROP}.
*/
@Deprecated
MutableSpan setSamplingPriority(final int newPriority);
String getSpanType();
MutableSpan setSpanType(final CharSequence type);
Map<String, Object> getTags();
default Object getTag(String key) {
Map<String, Object> tags = getTags();
return tags == null ? null : tags.get(key);
}
MutableSpan setTag(final String tag, final String value);
MutableSpan setTag(final String tag, final boolean value);
MutableSpan setTag(final String tag, final Number value);
MutableSpan setMetric(final CharSequence metric, final int value);
MutableSpan setMetric(final CharSequence metric, final long value);
MutableSpan setMetric(final CharSequence metric, final float value);
MutableSpan setMetric(final CharSequence metric, final double value);
boolean isError();
MutableSpan setError(boolean value);
/**
* @deprecated Use {@link #getLocalRootSpan()} instead.
*/
@Deprecated
MutableSpan getRootSpan();
/**
* Returns the root span for current the trace fragment. In the context of distributed tracing
* this method returns the root span only for the fragment generated by the currently traced
* application.
*
* @return The root span for the current trace fragment.
*/
MutableSpan getLocalRootSpan();
}