Program Listing for File tracer_config.h
↰ Return to documentation for file (/tmp/B.puc0r6hi/BUILD/opentelemetry-cpp-1.27.0-build/opentelemetry-cpp-1.27.0/sdk/include/opentelemetry/sdk/trace/tracer_config.h)
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include "opentelemetry/version.h"
OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace trace
{
class OPENTELEMETRY_EXPORT TracerConfig
{
public:
bool operator==(const TracerConfig &other) const noexcept;
bool IsEnabled() const noexcept;
static TracerConfig Disabled();
static TracerConfig Enabled();
static TracerConfig Default();
private:
explicit TracerConfig(const bool enabled = true) : enabled_(enabled) {}
bool enabled_;
};
} // namespace trace
} // namespace sdk
OPENTELEMETRY_END_NAMESPACE