@Experimental public class SpanBuilder extends Object
Span
. See Span.builder(Class, String)
.Modifier and Type | Method and Description |
---|---|
Span |
build() |
SpanBuilder |
setAttribute(String key,
double value)
Additional attribute to be attached to this
Span . |
SpanBuilder |
setAttribute(String key,
long value)
Additional attribute to be attached to this
Span . |
SpanBuilder |
setAttribute(String key,
String value)
Additional attribute to be attached to this
Span . |
SpanBuilder |
setEndTsMillis(long endTsMillis)
Optionally you can manually set the
Span 's endTs. |
SpanBuilder |
setStartTsMillis(long startTsMillis)
Optionally you can manually set the
Span 's startTs. |
public Span build()
public SpanBuilder setStartTsMillis(long startTsMillis)
Span
's startTs. If not specified, System.currentTimeMillis()
will be used.public SpanBuilder setEndTsMillis(long endTsMillis)
Span
's endTs. If not specified, startTsMillis
will be used (see setStartTsMillis(long)
)..public SpanBuilder setAttribute(String key, String value)
Span
.public SpanBuilder setAttribute(String key, long value)
Span
.public SpanBuilder setAttribute(String key, double value)
Span
.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.