Package io.opencensus.trace
Class EndSpanOptions.Builder
java.lang.Object
io.opencensus.trace.EndSpanOptions.Builder
- Direct Known Subclasses:
AutoValue_EndSpanOptions.Builder
- Enclosing class:
EndSpanOptions
Builder class for
EndSpanOptions
.- Since:
- 0.5
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract 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
Sets the status for theSpan
.
-
Constructor Details
-
Builder
Builder()
-
-
Method Details
-
setStatus
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
Builds and returns aEndSpanOptions
with the desired settings.- Returns:
- a
EndSpanOptions
with the desired settings. - Since:
- 0.5
-