public class Configuration
extends java.lang.Object
Tracer or Tracer.Builder when Jaeger client
configuration is provided in environmental or property variables. It also simplifies creation
of the client from configuration files.| Modifier and Type | Class and Description |
|---|---|
static class |
Configuration.CodecConfiguration
CodecConfiguration can be used to support additional trace context propagation codec.
|
static class |
Configuration.Propagation
The supported trace context propagation formats.
|
static class |
Configuration.ReporterConfiguration |
static class |
Configuration.SamplerConfiguration
SamplerConfiguration allows to configure which sampler the tracer will use.
|
static class |
Configuration.SenderConfiguration
Holds the configuration related to the sender.
|
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_SAMPLING_PROBABILITY
Deprecated.
|
static java.lang.String |
JAEGER_AGENT_HOST
The host name used to locate the agent.
|
static java.lang.String |
JAEGER_AGENT_PORT
The port used to locate the agent.
|
static java.lang.String |
JAEGER_AUTH_TOKEN
The Auth Token to be added as "Bearer" on Authorization headers for requests sent to the endpoint
|
static java.lang.String |
JAEGER_ENDPOINT
The full URL to the
traces endpoint, like https://jaeger-collector:14268/api/traces |
static java.lang.String |
JAEGER_PASSWORD
The Basic Auth password to be added on Authorization headers for requests sent to the endpoint
|
static java.lang.String |
JAEGER_PREFIX
Prefix for all properties used to configure the Jaeger tracer.
|
static java.lang.String |
JAEGER_PROPAGATION
Comma separated list of formats to use for propagating the trace context.
|
static java.lang.String |
JAEGER_REPORTER_FLUSH_INTERVAL
The flush interval when reporting spans remotely.
|
static java.lang.String |
JAEGER_REPORTER_LOG_SPANS
Whether the reporter should log the spans.
|
static java.lang.String |
JAEGER_REPORTER_MAX_QUEUE_SIZE
The maximum queue size for use when reporting spans remotely.
|
static java.lang.String |
JAEGER_SAMPLER_MANAGER_HOST_PORT
The sampler manager host:port.
|
static java.lang.String |
JAEGER_SAMPLER_PARAM
The sampler parameter (number).
|
static java.lang.String |
JAEGER_SAMPLER_TYPE
The sampler type.
|
static java.lang.String |
JAEGER_SERVICE_NAME
The service name.
|
static java.lang.String |
JAEGER_TAGS
The tracer level tags.
|
static java.lang.String |
JAEGER_USER
The Basic Auth username to be added on Authorization headers for requests sent to the endpoint
|
| Constructor and Description |
|---|
Configuration(java.lang.String serviceName) |
Configuration(java.lang.String serviceName,
Configuration.SamplerConfiguration samplerConfig,
Configuration.ReporterConfiguration reporterConfig)
Deprecated.
use
Configuration(String) and fluent API |
| Modifier and Type | Method and Description |
|---|---|
void |
closeTracer() |
static Configuration |
fromEnv() |
Configuration.ReporterConfiguration |
getReporter() |
Configuration.SamplerConfiguration |
getSampler() |
io.opentracing.Tracer |
getTracer() |
Tracer.Builder |
getTracerBuilder() |
java.util.Map<java.lang.String,java.lang.String> |
getTracerTags() |
void |
setStatsFactor(StatsFactory statsFactory)
Deprecated.
Use
withMetricsFactory(MetricsFactory) instead |
void |
setStatsFactory(StatsFactory statsFactory)
Deprecated.
Use
withMetricsFactory(MetricsFactory) instead |
Configuration |
withCodec(Configuration.CodecConfiguration codecConfig) |
void |
withMetricsFactory(MetricsFactory metricsFactory) |
Configuration |
withReporter(Configuration.ReporterConfiguration reporterConfig) |
Configuration |
withSampler(Configuration.SamplerConfiguration samplerConfig) |
Configuration |
withTracerTags(java.util.Map<java.lang.String,java.lang.String> tracerTags) |
@Deprecated public static final double DEFAULT_SAMPLING_PROBABILITY
ProbabilisticSampler.DEFAULT_SAMPLING_PROBABILITY insteadpublic static final java.lang.String JAEGER_PREFIX
public static final java.lang.String JAEGER_ENDPOINT
traces endpoint, like https://jaeger-collector:14268/api/tracespublic static final java.lang.String JAEGER_AUTH_TOKEN
public static final java.lang.String JAEGER_USER
public static final java.lang.String JAEGER_PASSWORD
public static final java.lang.String JAEGER_AGENT_HOST
public static final java.lang.String JAEGER_AGENT_PORT
public static final java.lang.String JAEGER_REPORTER_LOG_SPANS
public static final java.lang.String JAEGER_REPORTER_MAX_QUEUE_SIZE
public static final java.lang.String JAEGER_REPORTER_FLUSH_INTERVAL
public static final java.lang.String JAEGER_SAMPLER_TYPE
public static final java.lang.String JAEGER_SAMPLER_PARAM
public static final java.lang.String JAEGER_SAMPLER_MANAGER_HOST_PORT
public static final java.lang.String JAEGER_SERVICE_NAME
public static final java.lang.String JAEGER_TAGS
public static final java.lang.String JAEGER_PROPAGATION
public Configuration(java.lang.String serviceName)
@Deprecated
public Configuration(java.lang.String serviceName,
Configuration.SamplerConfiguration samplerConfig,
Configuration.ReporterConfiguration reporterConfig)
Configuration(String) and fluent APIpublic static Configuration fromEnv()
public Tracer.Builder getTracerBuilder()
public io.opentracing.Tracer getTracer()
public void closeTracer()
@Deprecated public void setStatsFactor(StatsFactory statsFactory)
withMetricsFactory(MetricsFactory) insteadstatsFactory - the StatsFactory to use on the Tracer to be builtwithMetricsFactory(MetricsFactory)@Deprecated public void setStatsFactory(StatsFactory statsFactory)
withMetricsFactory(MetricsFactory) insteadstatsFactory - the StatsFactory to use on the Tracer to be builtwithMetricsFactory(MetricsFactory)public void withMetricsFactory(MetricsFactory metricsFactory)
metricsFactory - the MetricsFactory to use on the Tracer to be builtpublic Configuration withReporter(Configuration.ReporterConfiguration reporterConfig)
public Configuration withSampler(Configuration.SamplerConfiguration samplerConfig)
public Configuration withCodec(Configuration.CodecConfiguration codecConfig)
public Configuration withTracerTags(java.util.Map<java.lang.String,java.lang.String> tracerTags)
public Configuration.ReporterConfiguration getReporter()
public Configuration.SamplerConfiguration getSampler()
public java.util.Map<java.lang.String,java.lang.String> getTracerTags()