Package io.opencensus.trace
Class EndSpanOptions.Builder
- java.lang.Object
-
- io.opencensus.trace.EndSpanOptions.Builder
-
- Direct Known Subclasses:
AutoValue_EndSpanOptions.Builder
- Enclosing class:
- EndSpanOptions
public abstract static class EndSpanOptions.Builder extends java.lang.Object
Builder class forEndSpanOptions
.- Since:
- 0.5
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract EndSpanOptions
build()
Builds and returns aEndSpanOptions
with the desired settings.abstract EndSpanOptions.Builder
setSampleToLocalSpanStore(boolean sampleToLocalSpanStore)
If set totrue
this is equivalent with calling theSampledSpanStore.registerSpanNamesForCollection(Collection)
in advance for the given span name.abstract EndSpanOptions.Builder
setStatus(Status status)
Sets the status for theSpan
.
-
-
-
Method Detail
-
setStatus
public abstract EndSpanOptions.Builder setStatus(Status status)
Sets the status for theSpan
.If set, this will override the status set via
Span.setStatus(Status)
.- Parameters:
status
- the status.- Returns:
- this.
- Since:
- 0.5
-
setSampleToLocalSpanStore
@ExperimentalApi public abstract EndSpanOptions.Builder setSampleToLocalSpanStore(boolean sampleToLocalSpanStore)
If set totrue
this is equivalent with calling theSampledSpanStore.registerSpanNamesForCollection(Collection)
in advance for the given span name.WARNING: setting this option to a randomly generated span name can OOM your process because the library will save samples for each name.
It is strongly recommended to use the
SampledSpanStore.registerSpanNamesForCollection(Collection)
API instead.- Returns:
- this.
- Since:
- 0.8
-
build
public abstract EndSpanOptions build()
Builds and returns aEndSpanOptions
with the desired settings.- Returns:
- a
EndSpanOptions
with the desired settings. - Since:
- 0.5
-
-