diff options
Diffstat (limited to 'src/jaegertracing/opentelemetry-cpp/sdk/src/_metrics/meter_provider.cc')
-rw-r--r-- | src/jaegertracing/opentelemetry-cpp/sdk/src/_metrics/meter_provider.cc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/jaegertracing/opentelemetry-cpp/sdk/src/_metrics/meter_provider.cc b/src/jaegertracing/opentelemetry-cpp/sdk/src/_metrics/meter_provider.cc new file mode 100644 index 000000000..9a36817a6 --- /dev/null +++ b/src/jaegertracing/opentelemetry-cpp/sdk/src/_metrics/meter_provider.cc @@ -0,0 +1,29 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#ifdef ENABLE_METRICS_PREVIEW +# include "opentelemetry/sdk/_metrics/meter_provider.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace sdk +{ +namespace metrics +{ +namespace nostd = opentelemetry::nostd; +namespace metrics_api = opentelemetry::metrics; + +MeterProvider::MeterProvider(std::string library_name, std::string library_version) noexcept + : meter_(new Meter(library_name, library_version)) +{} + +nostd::shared_ptr<metrics_api::Meter> MeterProvider::GetMeter( + nostd::string_view library_name, + nostd::string_view library_version) noexcept +{ + return nostd::shared_ptr<metrics_api::Meter>(meter_); +} + +} // namespace metrics +} // namespace sdk +OPENTELEMETRY_END_NAMESPACE +#endif |