]>
Commit | Line | Data |
---|---|---|
1e59de90 TL |
1 | // Copyright The OpenTelemetry Authors |
2 | // SPDX-License-Identifier: Apache-2.0 | |
3 | ||
4 | #pragma once | |
5 | #ifdef ENABLE_METRICS_PREVIEW | |
6 | ||
7 | # include <memory> | |
8 | # include "opentelemetry/sdk/_metrics/record.h" | |
9 | # include "opentelemetry/sdk/common/exporter_utils.h" | |
10 | ||
11 | OPENTELEMETRY_BEGIN_NAMESPACE | |
12 | namespace sdk | |
13 | { | |
14 | namespace metrics | |
15 | { | |
16 | /** | |
17 | * MetricsExporter defines the interface that protocol-specific span exporters must | |
18 | * implement. | |
19 | */ | |
20 | class MetricsExporter | |
21 | { | |
22 | public: | |
23 | virtual ~MetricsExporter() = default; | |
24 | ||
25 | /** | |
26 | * Exports a vector of Records. This method must not be called | |
27 | * concurrently for the same exporter instance. | |
28 | * @param records a vector of unique pointers to metric records | |
29 | */ | |
30 | virtual sdk::common::ExportResult Export(const std::vector<Record> &records) noexcept = 0; | |
31 | }; | |
32 | } // namespace metrics | |
33 | } // namespace sdk | |
34 | OPENTELEMETRY_END_NAMESPACE | |
35 | #endif |