File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
instrumentation-annotations/src/main/java/io/opentelemetry/instrumentation/annotations Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 66package io .opentelemetry .instrumentation .annotations ;
77
88import io .opentelemetry .api .trace .SpanKind ;
9+ import io .opentelemetry .context .Context ;
910import java .lang .annotation .ElementType ;
1011import java .lang .annotation .Retention ;
1112import java .lang .annotation .RetentionPolicy ;
3536 /** Specify the {@link SpanKind} of span to be created. Defaults to {@link SpanKind#INTERNAL}. */
3637 SpanKind kind () default SpanKind .INTERNAL ;
3738
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+ */
3948 boolean withParent () default true ;
4049}
You can’t perform that action at this time.
0 commit comments