]>
Commit | Line | Data |
---|---|---|
1e59de90 TL |
1 | // Copyright The OpenTelemetry Authors |
2 | // SPDX-License-Identifier: Apache-2.0 | |
3 | ||
4 | #pragma once | |
5 | #ifndef ENABLE_METRICS_PREVIEW | |
6 | ||
7 | # include "opentelemetry/metrics/meter.h" | |
8 | # include "opentelemetry/nostd/shared_ptr.h" | |
9 | # include "opentelemetry/nostd/string_view.h" | |
10 | ||
11 | OPENTELEMETRY_BEGIN_NAMESPACE | |
12 | namespace metrics | |
13 | { | |
14 | /** | |
15 | * Creates new Meter instances. | |
16 | */ | |
17 | class MeterProvider | |
18 | { | |
19 | public: | |
20 | virtual ~MeterProvider() = default; | |
21 | /** | |
22 | * Gets or creates a named Meter instance. | |
23 | * | |
24 | * Optionally a version can be passed to create a named and versioned Meter | |
25 | * instance. | |
26 | */ | |
27 | virtual nostd::shared_ptr<Meter> GetMeter(nostd::string_view library_name, | |
28 | nostd::string_view library_version = "", | |
29 | nostd::string_view schema_url = "") noexcept = 0; | |
30 | }; | |
31 | } // namespace metrics | |
32 | OPENTELEMETRY_END_NAMESPACE | |
33 | #endif |