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.Object
Builder class forTraceOptions
.- Since:
- 0.5
-
-
Field Summary
Fields Modifier and Type Field Description private byte
options
-
Constructor Summary
Constructors Modifier Constructor Description private
Builder(byte options)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TraceOptions
build()
Builds and returns aTraceOptions
with the desired options.TraceOptions.Builder
setIsSampled()
Deprecated.UseBuilder.setIsSampled(true)
.TraceOptions.Builder
setIsSampled(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 aTraceOptions
with the desired options.- Returns:
- a
TraceOptions
with the desired options. - Since:
- 0.5
-
-