]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/sdk/include/opentelemetry/sdk/metrics/data/metric_data.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / sdk / include / opentelemetry / sdk / metrics / data / metric_data.h
1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
3
4 #pragma once
5 #ifndef ENABLE_METRICS_PREVIEW
6 # include "opentelemetry/nostd/variant.h"
7 # include "opentelemetry/sdk/common/attribute_utils.h"
8 # include "opentelemetry/sdk/instrumentationlibrary/instrumentation_library.h"
9 # include "opentelemetry/sdk/metrics/data/point_data.h"
10 # include "opentelemetry/sdk/metrics/instruments.h"
11 # include "opentelemetry/sdk/resource/resource.h"
12 # include "opentelemetry/version.h"
13
14 OPENTELEMETRY_BEGIN_NAMESPACE
15 namespace sdk
16 {
17 namespace metrics
18 {
19
20 using PointAttributes = opentelemetry::sdk::common::OrderedAttributeMap;
21 using PointType = opentelemetry::nostd::
22 variant<SumPointData, HistogramPointData, LastValuePointData, DropPointData>;
23
24 struct PointDataAttributes
25 {
26 PointAttributes attributes;
27 PointType point_data;
28 };
29
30 class MetricData
31 {
32 public:
33 InstrumentDescriptor instrument_descriptor;
34 opentelemetry::common::SystemTimestamp start_ts;
35 opentelemetry::common::SystemTimestamp end_ts;
36 std::vector<PointDataAttributes> point_data_attr_;
37 };
38
39 } // namespace metrics
40 } // namespace sdk
41 OPENTELEMETRY_END_NAMESPACE
42 #endif