Package io.opencensus.trace
Class TraceOptions.Builder
- java.lang.Object
-
- io.opencensus.trace.TraceOptions.Builder
-
- Enclosing class:
- TraceOptions
public static final class TraceOptions.Builder extends java.lang.ObjectBuilder class forTraceOptions.- Since:
- 0.5
-
-
Field Summary
Fields Modifier and Type Field Description private byteoptions
-
Constructor Summary
Constructors Modifier Constructor Description privateBuilder(byte options)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TraceOptionsbuild()Builds and returns aTraceOptionswith the desired options.TraceOptions.BuildersetIsSampled()Deprecated.UseBuilder.setIsSampled(true).TraceOptions.BuildersetIsSampled(boolean isSampled)Sets the sampling bit in the options.
-
-
-
Method Detail
-
setIsSampled
@Deprecated public TraceOptions.Builder setIsSampled()
Deprecated.UseBuilder.setIsSampled(true).Sets the sampling bit in the options to true.- Returns:
- this.
- Since:
- 0.5
-
setIsSampled
public TraceOptions.Builder setIsSampled(boolean isSampled)
Sets the sampling bit in the options.- Parameters:
isSampled- the sampling bit.- Returns:
- this.
- Since:
- 0.7
-
build
public TraceOptions build()
Builds and returns aTraceOptionswith the desired options.- Returns:
- a
TraceOptionswith the desired options. - Since:
- 0.5
-
-