Package io.opencensus.trace
Class AutoValue_EndSpanOptions.Builder
- java.lang.Object
-
- io.opencensus.trace.EndSpanOptions.Builder
-
- io.opencensus.trace.AutoValue_EndSpanOptions.Builder
-
- Enclosing class:
- AutoValue_EndSpanOptions
static final class AutoValue_EndSpanOptions.Builder extends EndSpanOptions.Builder
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Boolean
sampleToLocalSpanStore
private Status
status
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EndSpanOptions
build()
Builds and returns aEndSpanOptions
with the desired settings.EndSpanOptions.Builder
setSampleToLocalSpanStore(boolean sampleToLocalSpanStore)
If set totrue
this is equivalent with calling theSampledSpanStore.registerSpanNamesForCollection(Collection)
in advance for the given span name.EndSpanOptions.Builder
setStatus(Status status)
Sets the status for theSpan
.
-
-
-
Field Detail
-
sampleToLocalSpanStore
private java.lang.Boolean sampleToLocalSpanStore
-
status
private Status status
-
-
Method Detail
-
setSampleToLocalSpanStore
public EndSpanOptions.Builder setSampleToLocalSpanStore(boolean sampleToLocalSpanStore)
Description copied from class:EndSpanOptions.Builder
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.- Specified by:
setSampleToLocalSpanStore
in classEndSpanOptions.Builder
- Returns:
- this.
-
setStatus
public EndSpanOptions.Builder setStatus(Status status)
Description copied from class:EndSpanOptions.Builder
Sets the status for theSpan
.If set, this will override the status set via
Span.setStatus(Status)
.- Specified by:
setStatus
in classEndSpanOptions.Builder
- Parameters:
status
- the status.- Returns:
- this.
-
build
public EndSpanOptions build()
Description copied from class:EndSpanOptions.Builder
Builds and returns aEndSpanOptions
with the desired settings.- Specified by:
build
in classEndSpanOptions.Builder
- Returns:
- a
EndSpanOptions
with the desired settings.
-
-