Package codes.grow.packages.tempo
Class TempoTracingConfig.Builder
java.lang.Object
codes.grow.packages.tempo.TempoTracingConfig.Builder
- Enclosing class:
TempoTracingConfig
Builder of
TempoTracingConfig; every field is optional.-
Method Summary
Modifier and TypeMethodDescriptionbatch(TracingConfig.BatchSettings batch) Sets the batch processor settings.build()Builds the (unresolved) settings.compression(TracingConfig.Compression compression) Sets the export compression.Sets the OTLP endpoint (http://host:4318or a full…/v1/tracesURL;http://host:4317for gRPC).environment(String environment) Setsdeployment.environment.Adds an export header.Replaces the export headers (for example a proxyAuthorization).propagators(List<String> propagators) Sets the propagators.protocol(TracingConfig.Protocol protocol) Sets the export protocol.resourceAttributes(Map<String, ?> attributes) Replaces the extra resource attributes.sampler(TracingConfig.SamplerType sampler) Sets the sampler.samplerRatio(double samplerRatio) Sets the ratio of the ratio samplers.serviceName(String serviceName) Setsservice.name(defaultOTEL_SERVICE_NAME).serviceVersion(String serviceVersion) Setsservice.version.setGlobal(boolean setGlobal) Whether to register the SDK as the global OpenTelemetry (default true).Sets the tenant sent asX-Scope-OrgID(gRPC metadatax-scope-orgid); an empty string removes the header.tls(TlsOptions tls) Sets the exporter TLS options.
-
Method Details
-
serviceName
Setsservice.name(defaultOTEL_SERVICE_NAME).- Parameters:
serviceName- name- Returns:
- this builder
-
serviceVersion
Setsservice.version.- Parameters:
serviceVersion- version ornull- Returns:
- this builder
-
environment
Setsdeployment.environment.- Parameters:
environment- environment ornull- Returns:
- this builder
-
resourceAttributes
Replaces the extra resource attributes.- Parameters:
attributes- attributes- Returns:
- this builder
-
endpoint
Sets the OTLP endpoint (http://host:4318or a full…/v1/tracesURL;http://host:4317for gRPC).- Parameters:
endpoint- URL ornull- Returns:
- this builder
-
protocol
Sets the export protocol.- Parameters:
protocol- protocol ornull- Returns:
- this builder
-
headers
Replaces the export headers (for example a proxyAuthorization).- Parameters:
headers- headers- Returns:
- this builder
-
header
Adds an export header.- Parameters:
name- namevalue- value- Returns:
- this builder
-
tenantId
Sets the tenant sent asX-Scope-OrgID(gRPC metadatax-scope-orgid); an empty string removes the header.- Parameters:
tenantId- tenant ornull(environment)- Returns:
- this builder
-
sampler
Sets the sampler.- Parameters:
sampler- sampler ornull- Returns:
- this builder
-
samplerRatio
Sets the ratio of the ratio samplers.- Parameters:
samplerRatio- between 0 and 1- Returns:
- this builder
-
propagators
Sets the propagators.- Parameters:
propagators- names (tracecontext,baggage,b3,b3multi)- Returns:
- this builder
-
batch
Sets the batch processor settings.- Parameters:
batch- settings- Returns:
- this builder
-
tls
Sets the exporter TLS options.- Parameters:
tls- options ornull- Returns:
- this builder
-
compression
Sets the export compression.- Parameters:
compression- compression ornull- Returns:
- this builder
-
setGlobal
Whether to register the SDK as the global OpenTelemetry (default true).- Parameters:
setGlobal- flag- Returns:
- this builder
-
build
Builds the (unresolved) settings.- Returns:
- settings
-