Program Listing for File meter_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/metrics/meter_config.h)
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include "opentelemetry/version.h"
OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace metrics
{
class OPENTELEMETRY_EXPORT MeterConfig
{
public:
bool operator==(const MeterConfig &other) const noexcept;
bool IsEnabled() const noexcept;
static MeterConfig Disabled();
static MeterConfig Enabled();
static MeterConfig Default();
private:
explicit MeterConfig(const bool enabled = true) : enabled_(enabled) {}
bool enabled_;
};
} // namespace metrics
} // namespace sdk
OPENTELEMETRY_END_NAMESPACE