Package org.apache.flink.traces
Class SpanBuilder
- java.lang.Object
-
- org.apache.flink.traces.SpanBuilder
-
@Experimental public class SpanBuilder extends Object
Builder used to constructSpan
. SeeSpan.builder(Class, String)
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Span
build()
SpanBuilder
setAttribute(String key, double value)
Additional attribute to be attached to thisSpan
.SpanBuilder
setAttribute(String key, long value)
Additional attribute to be attached to thisSpan
.SpanBuilder
setAttribute(String key, String value)
Additional attribute to be attached to thisSpan
.SpanBuilder
setEndTsMillis(long endTsMillis)
Optionally you can manually set theSpan
's endTs.SpanBuilder
setStartTsMillis(long startTsMillis)
Optionally you can manually set theSpan
's startTs.
-
-
-
Method Detail
-
build
public Span build()
-
setStartTsMillis
public SpanBuilder setStartTsMillis(long startTsMillis)
Optionally you can manually set theSpan
's startTs. If not specified,System.currentTimeMillis()
will be used.
-
setEndTsMillis
public SpanBuilder setEndTsMillis(long endTsMillis)
Optionally you can manually set theSpan
's endTs. If not specified,startTsMillis
will be used (seesetStartTsMillis(long)
)..
-
setAttribute
public SpanBuilder setAttribute(String key, String value)
Additional attribute to be attached to thisSpan
.
-
setAttribute
public SpanBuilder setAttribute(String key, long value)
Additional attribute to be attached to thisSpan
.
-
setAttribute
public SpanBuilder setAttribute(String key, double value)
Additional attribute to be attached to thisSpan
.
-
-