Class TracerConfig
Defined in File tracer_config.h
Class Documentation
-
class TracerConfig
TracerConfig defines various configurable aspects of a Tracer’s behavior. This class should not be used directly to configure a Tracer’s behavior, instead a ScopeConfigurator should be used to compute the desired TracerConfig which can then be used to configure a Tracer.
Public Functions
-
bool operator==(const TracerConfig &other) const noexcept
-
bool IsEnabled() const noexcept
Returns if the Tracer is enabled or disabled. Tracers are enabled by default.
- Returns:
a boolean indicating if the Tracer is enabled. Defaults to true.
Public Static Functions
-
static TracerConfig Disabled()
Returns a TracerConfig that represents a disabled Tracer. A disabled tracer behaves like a no-op tracer.
- Returns:
a static constant TracerConfig that represents a disabled tracer.
-
static TracerConfig Enabled()
Returns a TracerConfig that represents an enabled Tracer.
- Returns:
a static constant TracerConfig that represents an enabled tracer.
-
static TracerConfig Default()
Returns a TracerConfig that represents a Tracer configured with the default behavior. The default behavior is guided by the OpenTelemetry specification.
- Returns:
a static constant TracerConfig that represents a tracer configured with default behavior.
-
bool operator==(const TracerConfig &other) const noexcept