Class TracingOptions

java.lang.Object
com.azure.core.util.TracingOptions

public class TracingOptions extends Object
Tracing configuration options for clients.
  • Constructor Details

  • Method Details

    • fromConfiguration

      public static TracingOptions fromConfiguration(Configuration configuration)
      Loads tracing options from the configuration.
      Parameters:
      configuration - The Configuration instance containing tracing options. If null is passed then Configuration.getGlobalConfiguration() will be used.
      Returns:
      A TracingOptions reflecting updated tracing options loaded from the configuration, if no tracing options are found, default (enabled) tracing options will be returned.
    • isEnabled

      public boolean isEnabled()
      Flag indicating if distributed tracing should be enabled.
      Returns:
      true if tracing is enabled, false otherwise.
    • 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:
      enabled - pass true to enable tracing.
      Returns:
      the updated TracingOptions object.
    • getTracerProvider

      public Class<? extends TracerProvider> getTracerProvider()
      Gets name of the TracerProvider implementation that should be used to construct an instance of Tracer.
      Returns:
      The TracerProvider implementation used to create an instance of Tracer.
    • getAllowedTracingQueryParamNames

      public Set<String> getAllowedTracingQueryParamNames()
      Gets the set of query parameter names that are allowed to be recorded in the URL.
      Returns:
      The set of query parameter names that are allowed to be recorded in the URL.
    • setAllowedTracingQueryParamNames

      public TracingOptions setAllowedTracingQueryParamNames(Set<String> allowedQueryParamNames)
      Sets the set of query parameter names that are allowed to be recorded in the URL.
      Parameters:
      allowedQueryParamNames - The set of query parameter names that are allowed to be recorded in the URL.
      Returns:
      The updated TracingOptions object.