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 Spanbuild()SpanBuildersetAttribute(String key, double value)Additional attribute to be attached to thisSpan.SpanBuildersetAttribute(String key, long value)Additional attribute to be attached to thisSpan.SpanBuildersetAttribute(String key, String value)Additional attribute to be attached to thisSpan.SpanBuildersetEndTsMillis(long endTsMillis)Optionally you can manually set theSpan's endTs.SpanBuildersetStartTsMillis(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,startTsMilliswill 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.
-
-