public class Configuration
extends java.lang.Object
JaegerTracer or JaegerTracer.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 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_SENDER_FACTORY
When there are multiple service providers for the
SenderFactory available,
this var is used to select a SenderFactory by matching it with
SenderFactory.getType(). |
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) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeTracer() |
static Configuration |
fromEnv() |
Configuration.CodecConfiguration |
getCodec() |
MetricsFactory |
getMetricsFactory() |
Configuration.ReporterConfiguration |
getReporter() |
Configuration.SamplerConfiguration |
getSampler() |
java.lang.String |
getServiceName() |
JaegerTracer |
getTracer() |
JaegerTracer.Builder |
getTracerBuilder() |
java.util.Map<java.lang.String,java.lang.String> |
getTracerTags() |
Configuration |
withCodec(Configuration.CodecConfiguration codecConfig) |
Configuration |
withMetricsFactory(MetricsFactory metricsFactory) |
Configuration |
withReporter(Configuration.ReporterConfiguration reporterConfig) |
Configuration |
withSampler(Configuration.SamplerConfiguration samplerConfig) |
Configuration |
withServiceName(java.lang.String serviceName) |
Configuration |
withTracerTags(java.util.Map<java.lang.String,java.lang.String> tracerTags) |
public 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 static final java.lang.String JAEGER_SENDER_FACTORY
SenderFactory available,
this var is used to select a SenderFactory by matching it with
SenderFactory.getType().public static Configuration fromEnv()
public JaegerTracer.Builder getTracerBuilder()
public JaegerTracer getTracer()
public void closeTracer()
public Configuration withMetricsFactory(MetricsFactory metricsFactory)
metricsFactory - the MetricsFactory to use on the JaegerTracer to be builtpublic Configuration withServiceName(java.lang.String serviceName)
public 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 java.lang.String getServiceName()
public Configuration.ReporterConfiguration getReporter()
public Configuration.SamplerConfiguration getSampler()
public Configuration.CodecConfiguration getCodec()
public MetricsFactory getMetricsFactory()
public java.util.Map<java.lang.String,java.lang.String> getTracerTags()