-
public final class AndroidTracer.BuilderBuilds a AndroidTracer instance.
-
-
Constructor Summary
Constructors Constructor Description AndroidTracer.Builder()
-
Method Summary
Modifier and Type Method Description final AndroidTracerbuild()Builds a AndroidTracer based on the current state of this Builder. final AndroidTracer.BuildersetTracingHeaderTypes(Set<TracingHeaderType> headerTypes)Sets the tracing header styles that may be injected by this tracer. final AndroidTracer.BuildersetServiceName(String serviceName)Sets the service name that will appear in your traces. final AndroidTracer.BuildersetPartialFlushThreshold(Integer threshold)Sets the partial flush threshold. final AndroidTracer.BuilderaddGlobalTag(String key, String value)Adds a global tag which will be appended to all spans created with the built tracer. final AndroidTracer.BuildersetBundleWithRumEnabled(Boolean enabled)Enables the trace bundling with the current active View. final AndroidTracer.BuildersetSamplingRate(@FloatRange(from = 0.0.toDouble(), to = 100.0.toDouble()) Double samplingRate)Sets the sampling rate of spans. -
-
Method Detail
-
build
final AndroidTracer build()
Builds a AndroidTracer based on the current state of this Builder.
-
setTracingHeaderTypes
final AndroidTracer.Builder setTracingHeaderTypes(Set<TracingHeaderType> headerTypes)
Sets the tracing header styles that may be injected by this tracer.
- Parameters:
headerTypes- the list of header types injected (default = datadog style headers)
-
setServiceName
final AndroidTracer.Builder setServiceName(String serviceName)
Sets the service name that will appear in your traces.
- Parameters:
serviceName- the service name (default = application package name)
-
setPartialFlushThreshold
final AndroidTracer.Builder setPartialFlushThreshold(Integer threshold)
Sets the partial flush threshold. When this threshold is reached (you have a specific amount of spans closed waiting) the flush mechanism will be triggered and all the pending closed spans will be processed in order to be sent to the intake.
- Parameters:
threshold- the threshold value (default = 5)
-
addGlobalTag
final AndroidTracer.Builder addGlobalTag(String key, String value)
Adds a global tag which will be appended to all spans created with the built tracer.
- Parameters:
key- the tag keyvalue- the tag value
-
setBundleWithRumEnabled
final AndroidTracer.Builder setBundleWithRumEnabled(Boolean enabled)
Enables the trace bundling with the current active View. If this feature is enabled all the spans from this moment on will be bundled with the current view information and you will be able to see all the traces sent during a specific view in the Rum Explorer.
- Parameters:
enabled- true by default
-
setSamplingRate
final AndroidTracer.Builder setSamplingRate(@FloatRange(from = 0.0.toDouble(), to = 100.0.toDouble()) Double samplingRate)
Sets the sampling rate of spans.
- Parameters:
samplingRate- the sampling rate as a percentage between 0 and 100 (default is 100%)
-
-
-
-