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 EndSpanOptionsbuild()Builds and returns aEndSpanOptionswith the desired settings.abstract EndSpanOptions.BuildersetSampleToLocalSpanStore(boolean sampleToLocalSpanStore) If set totruethis is equivalent with calling theSampledSpanStore.registerSpanNamesForCollection(Collection)in advance for the given span name.abstract EndSpanOptions.BuilderSets 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 totruethis 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 aEndSpanOptionswith the desired settings.- Returns:
- a
EndSpanOptionswith the desired settings. - Since:
- 0.5
-