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.ObjectA 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 classEndSpanOptions.BuilderBuilder class forEndSpanOptions.
-
Field Summary
Fields Modifier and Type Field Description static EndSpanOptionsDEFAULTThe 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.Builderbuilder()Returns a newEndSpanOptions.Builderwith default options.abstract booleangetSampleToLocalSpanStore()Iftruethis is equivalent with calling theSampledSpanStore.registerSpanNamesForCollection(Collection)in advance for this span name.abstract StatusgetStatus()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.Builderwith default options.- Returns:
- a new
Builderwith default options. - Since:
- 0.5
-
getSampleToLocalSpanStore
@ExperimentalApi public abstract boolean getSampleToLocalSpanStore()
Iftruethis is equivalent with calling theSampledSpanStore.registerSpanNamesForCollection(Collection)in advance for this span name.- Returns:
trueif the name of theSpanshould be registered to theio.opencensus.trace.export.SampledSpanStore.- Since:
- 0.8
-
getStatus
@Nullable public abstract Status getStatus()
Returns the status.If
nullthen theSpanwill record theStatusset viaSpan.setStatus(Status)or the defaultStatus.OKif no status was set.- Returns:
- the status.
- Since:
- 0.5
-
-