File tree 1 file changed +10
-1
lines changed
instrumentation-annotations/src/main/java/io/opentelemetry/instrumentation/annotations
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 6
6
package io .opentelemetry .instrumentation .annotations ;
7
7
8
8
import io .opentelemetry .api .trace .SpanKind ;
9
+ import io .opentelemetry .context .Context ;
9
10
import java .lang .annotation .ElementType ;
10
11
import java .lang .annotation .Retention ;
11
12
import java .lang .annotation .RetentionPolicy ;
35
36
/** Specify the {@link SpanKind} of span to be created. Defaults to {@link SpanKind#INTERNAL}. */
36
37
SpanKind kind () default SpanKind .INTERNAL ;
37
38
38
- /** Specify whether to create a new span with parent. Defaults to {@code true}. */
39
+ /**
40
+ * Specifies whether to use the current context as the parent when creating a Span.
41
+ *
42
+ * <p>If set to {@code true} (default), the created span will inherit the existing parent context,
43
+ * forming part of the same trace.
44
+ *
45
+ * <p>If set to {@code false}, the created span will use {@link Context#root()} and have no
46
+ * parent, starting a new trace independently.
47
+ */
39
48
boolean withParent () default true ;
40
49
}
You can’t perform that action at this time.
0 commit comments