TracingOptions Class
- java.
lang. Object - com.
azure. core. util. TracingOptions
- com.
public class TracingOptions
Tracing configuration options for clients.
Constructor Summary
Modifier | Constructor | Description |
---|---|---|
TracingOptions() |
Creates new instance of TracingOptions |
|
protected | TracingOptions(Class<? extends TracerProvider> tracerProvider) |
Creates new instance of TracingOptions |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Tracing |
fromConfiguration(Configuration configuration)
Loads tracing options from the configuration. |
Set<String> |
getAllowedTracingQueryParamNames()
Gets the set of query parameter names that are allowed to be recorded in the URL. |
Class<> |
getTracerProvider()
Gets name of the TracerProvider implementation that should be used to construct an instance of Tracer. |
boolean |
isEnabled()
Flag indicating if distributed tracing should be enabled. |
Tracing |
setAllowedTracingQueryParamNames(Set<String> allowedQueryParamNames)
Sets the set of query parameter names that are allowed to be recorded in the URL. |
Tracing |
setEnabled(boolean enabled)
Enables or disables distributed tracing. |
Methods inherited from java.lang.Object
Constructor Details
TracingOptions
public TracingOptions()
Creates new instance of TracingOptions
TracingOptions
protected TracingOptions(Class tracerProvider)
Creates new instance of TracingOptions
Parameters:
null
), then the first TracerProvider resolved by ServiceLoader will
be used to create an instance of Tracer. If the value is set and doesn't match any
TracerProvider resolved by ServiceLoader an IllegalStateException will be thrown when
attempting to create an instance of Tracer.
Method Details
fromConfiguration
public static TracingOptions fromConfiguration(Configuration configuration)
Loads tracing options from the configuration.
Parameters:
null
is passed then getGlobalConfiguration() will be used.
Returns:
getAllowedTracingQueryParamNames
public Set
Gets the set of query parameter names that are allowed to be recorded in the URL.
Returns:
getTracerProvider
isEnabled
public boolean isEnabled()
Flag indicating if distributed tracing should be enabled.
Returns:
true
if tracing is enabled, false
otherwise.setAllowedTracingQueryParamNames
public TracingOptions setAllowedTracingQueryParamNames(Set
Sets the set of query parameter names that are allowed to be recorded in the URL.
Parameters:
Returns:
setEnabled
public TracingOptions setEnabled(boolean enabled)
Enables or disables distributed tracing. By default, tracing is enabled if and only if tracing implementation is detected.
Parameters:
true
to enable tracing.
Returns:
TracingOptions
object.Applies to
Azure SDK for Java