| Constructor and Description |
|---|
OptionsBuilder() |
OptionsBuilder(Options options) |
| Modifier and Type | Method and Description |
|---|---|
Options |
build()
Sets the defaults for values not provided and constructs a new Options object.
|
Options.OptionsBuilder |
withAccessToken(String accessToken)
Sets the unique identifier for this application.
|
Options.OptionsBuilder |
withClockSkewCorrection(boolean clockCorrection) |
Options.OptionsBuilder |
withCollectorClient(Options.CollectorClient collectorClient)
Sets the collector client explicitly.
|
Options.OptionsBuilder |
withCollectorHost(String collectorHost)
Sets the host to which the tracer will send data.
|
Options.OptionsBuilder |
withCollectorPort(int collectorPort)
Sets the port to which the tracer will send data.
|
Options.OptionsBuilder |
withCollectorProtocol(String protocol)
Sets the protocol which will be used when sending data to the tracer.
|
Options.OptionsBuilder |
withComponentName(String name)
Sets the component name attribute.
|
Options.OptionsBuilder |
withDeadlineMillis(long deadlineMillis)
Overrides the default deadlineMillis with the provided value.
|
Options.OptionsBuilder |
withDisableMetaEventLogging(boolean disableMetaEventLogging)
Disables LightStep Meta Event Reporting
even if a server command requested it.
|
Options.OptionsBuilder |
withDisableMetricsReporting(boolean disable)
If true, metrics reporting will be disabled.
|
Options.OptionsBuilder |
withDisableReportingLoop(boolean disable)
If true, the background reporting loop will be disabled.
|
Options.OptionsBuilder |
withDropSpansOnFailure(boolean dropSpansOnFailure)
Instructs the Tracer to either to drop Spans for failed requests
or else do a best effort to keep them in the current buffer.
|
Options.OptionsBuilder |
withGrpcCollectorTarget(String grpcCollectorTarget)
Sets the target address when using gRPC for transport.
|
Options.OptionsBuilder |
withGrpcRoundRobin(boolean grpcRoundRobin)
Instructs gRPC to round-robin between satellites instances in a pool when sending traces.
|
Options.OptionsBuilder |
withHostname(String hostname)
Sets the hostname.
|
Options.OptionsBuilder |
withMaxBufferedSpans(int maxBufferedSpans)
Sets the maximum number of finished Spans buffered locally before flushing.
|
Options.OptionsBuilder |
withMaxReportingIntervalMillis(int maxReportingIntervalMillis)
Sets the maximum interval between reports.
|
Options.OptionsBuilder |
withMetricsUrl(String metricsUrl)
Uses the specified value as the metrics collector url.
|
Options.OptionsBuilder |
withOkHttpDns(Options.OkHttpDns okhttpDns)
Sets the DNS service used to lookup IP addresses for hostnames when using the
OkHttp transport.
|
<T> Options.OptionsBuilder |
withPropagator(io.opentracing.propagation.Format<T> format,
Propagator propagator)
Adds a user defined
Propagator to be used during
Tracer.inject(io.opentracing.SpanContext, io.opentracing.propagation.Format<C>, C) and Tracer.extract(io.opentracing.propagation.Format<C>, C) for
the given type. |
Options.OptionsBuilder |
withResetClient(boolean reset)
If true, the GRPC client connection will be reset at regular intevals
Used to load balance on server side
|
Options.OptionsBuilder |
withResetSpansOnConsecutiveFailures(int resetSpansOnConsecutiveFailures)
Instructs the Tracer to reset the span buffer after n-number of consecutive
failures retryng unsuccesful requests.
|
Options.OptionsBuilder |
withScopeManager(io.opentracing.ScopeManager scopeManager)
Sets scope manager attribute.
|
Options.OptionsBuilder |
withServiceVersion(String serviceVersion)
Sets the service version.
|
Options.OptionsBuilder |
withTag(String key,
Object value)
Sets a user-defined key-value pair that should be associated with all of the
data produced by this tracer.
|
Options.OptionsBuilder |
withVerbosity(int verbosity)
Controls the amount of local output produced by the tracer.
|
public OptionsBuilder()
public OptionsBuilder(Options options)
public Options.OptionsBuilder withDropSpansOnFailure(boolean dropSpansOnFailure)
dropSpansOnFailure - whether the tracer should drop spans for failed requests.public Options.OptionsBuilder withResetSpansOnConsecutiveFailures(int resetSpansOnConsecutiveFailures)
resetSpansOnConsecutiveFailures - number of failed consecutuve requests before span is reset.public <T> Options.OptionsBuilder withPropagator(io.opentracing.propagation.Format<T> format, Propagator propagator)
Propagator to be used during
Tracer.inject(io.opentracing.SpanContext, io.opentracing.propagation.Format<C>, C) and Tracer.extract(io.opentracing.propagation.Format<C>, C) for
the given type. This can be used to provide custom handling for a specified
Format (such as Format.Builtin#TEXT_MAP).
Propagator.inject(com.lightstep.tracer.shared.SpanContext, C) and Propagator.extract(C) are expected
to fail silently in case of error during injection and extraction, respectively.
Observe that a new Format should *not* be created if the data is being
propagated through http headers or a text map. Instead, use the respective
builtin Format and specify a custom Propagator here. In case of
doubt, contact LightStep for advice.T - Type of the carrier.format - Instance of Format for which custom Propagator will be used.propagator - Instance of Propagator to be usedpublic Options.OptionsBuilder withAccessToken(String accessToken)
accessToken - Your specific token for LightStep access.public Options.OptionsBuilder withServiceVersion(String serviceVersion)
public Options.OptionsBuilder withHostname(String hostname)
InetAddress.getLocalHost().getHostName().hostname - hostnamepublic Options.OptionsBuilder withCollectorProtocol(String protocol)
LightStepConstants.Collector.PROTOCOL_HTTPS or
LightStepConstants.Collector.PROTOCOL_HTTP.protocol - Either PROTOCOL_HTTPS or PROTOCOL_HTTP.IllegalArgumentException - If the protocol argument is invalid.public Options.OptionsBuilder withCollectorHost(String collectorHost)
collectorHost - The hostname for the LightStep collector.IllegalArgumentException - If the collectorHost argument is invalid.public Options.OptionsBuilder withCollectorPort(int collectorPort)
LightStepConstants.Collector.DEFAULT_SECURE_PORT when the protocol is https and
LightStepConstants.Collector.DEFAULT_PLAINTEXT_PORT when the protocol is http.collectorPort - The port for the LightStep collector.IllegalArgumentException - If the collectorPort is invalid.public Options.OptionsBuilder withCollectorClient(Options.CollectorClient collectorClient)
collectorClient - The collector client to usepublic Options.OptionsBuilder withGrpcCollectorTarget(String grpcCollectorTarget)
grpcCollectorTarget - The target URI for the LightStep collector.IllegalArgumentException - If the grpcCollectorTarget is invalid.public Options.OptionsBuilder withGrpcRoundRobin(boolean grpcRoundRobin)
grpcRoundRobin - Use round robin on a per request basis when sending requests to
the satellites.public Options.OptionsBuilder withOkHttpDns(Options.OkHttpDns okhttpDns)
This has no effect when using gRPC as transport system.
okhttpDns - the Dns service object.public Options.OptionsBuilder withScopeManager(io.opentracing.ScopeManager scopeManager)
scopeManager - The scopeManager for the LightStep tracer.IllegalArgumentException - If the scopeManager is null.public Options.OptionsBuilder withComponentName(String name)
name - The name of the component being traced.public Options.OptionsBuilder withTag(String key, Object value)
public Options.OptionsBuilder withMaxReportingIntervalMillis(int maxReportingIntervalMillis)
maxReportingIntervalMillis - The maximum interval of time that will pass between
reports.public Options.OptionsBuilder withMaxBufferedSpans(int maxBufferedSpans)
maxBufferedSpans - The maximum number of Spans buffered locally.public Options.OptionsBuilder withVerbosity(int verbosity)
public Options.OptionsBuilder withDisableReportingLoop(boolean disable)
DEFAULT_REPORTING_INTERVAL_MILLIS.public Options.OptionsBuilder withResetClient(boolean reset)
public Options.OptionsBuilder withDeadlineMillis(long deadlineMillis)
public Options.OptionsBuilder withMetricsUrl(String metricsUrl)
public Options.OptionsBuilder withDisableMetricsReporting(boolean disable)
false.public Options.OptionsBuilder withDisableMetaEventLogging(boolean disableMetaEventLogging)
disableMetaEventLogging - public Options.OptionsBuilder withClockSkewCorrection(boolean clockCorrection)
public Options build() throws MalformedURLException
MalformedURLException - If the combination of collector protocol, host, and port
are not validCopyright © 2023 LightStep. All rights reserved.