Package io.opencensus.trace
Class EndSpanOptions
- java.lang.Object
-
- io.opencensus.trace.EndSpanOptions
-
- Direct Known Subclasses:
AutoValue_EndSpanOptions
@Immutable public abstract class EndSpanOptions extends java.lang.Object
A class that enables overriding the default values used when ending aSpan
. Allows overriding thestatus
.- Since:
- 0.5
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EndSpanOptions.Builder
Builder class forEndSpanOptions
.
-
Field Summary
Fields Modifier and Type Field Description static EndSpanOptions
DEFAULT
The defaultEndSpanOptions
.
-
Constructor Summary
Constructors Constructor Description EndSpanOptions()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static EndSpanOptions.Builder
builder()
Returns a newEndSpanOptions.Builder
with default options.abstract boolean
getSampleToLocalSpanStore()
Iftrue
this is equivalent with calling theSampledSpanStore.registerSpanNamesForCollection(Collection)
in advance for this span name.abstract Status
getStatus()
Returns the status.
-
-
-
Field Detail
-
DEFAULT
public static final EndSpanOptions DEFAULT
The defaultEndSpanOptions
.- Since:
- 0.5
-
-
Method Detail
-
builder
public static EndSpanOptions.Builder builder()
Returns a newEndSpanOptions.Builder
with default options.- Returns:
- a new
Builder
with default options. - Since:
- 0.5
-
getSampleToLocalSpanStore
@ExperimentalApi public abstract boolean getSampleToLocalSpanStore()
Iftrue
this is equivalent with calling theSampledSpanStore.registerSpanNamesForCollection(Collection)
in advance for this span name.- Returns:
true
if the name of theSpan
should be registered to theio.opencensus.trace.export.SampledSpanStore
.- Since:
- 0.8
-
getStatus
@Nullable public abstract Status getStatus()
Returns the status.If
null
then theSpan
will record theStatus
set viaSpan.setStatus(Status)
or the defaultStatus.OK
if no status was set.- Returns:
- the status.
- Since:
- 0.5
-
-