]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/sdk/include/opentelemetry/sdk/metrics/exemplar/data.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / sdk / include / opentelemetry / sdk / metrics / exemplar / 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/common/timestamp.h"
7 # include "opentelemetry/context/context.h"
8 # include "opentelemetry/sdk/common/attribute_utils.h"
9
10 OPENTELEMETRY_BEGIN_NAMESPACE
11 namespace sdk
12 {
13 namespace metrics
14 {
15 using MetricAttributes = opentelemetry::sdk::common::OrderedAttributeMap;
16 /**
17 * A sample input measurement.
18 *
19 * Exemplars also hold information about the environment when the measurement was recorded, for
20 * example the span and trace ID of the active span when the exemplar was recorded.
21 */
22 class ExemplarData
23 {
24 public:
25 /**
26 * The set of key/value pairs that were filtered out by the aggregator, but recorded alongside the
27 * original measurement. Only key/value pairs that were filtered out by the aggregator should be
28 * included
29 */
30 MetricAttributes GetFilteredAttributes();
31
32 /** Returns the timestamp in nanos when measurement was collected. */
33 opentelemetry::common::SystemTimestamp GetEpochNanos();
34
35 /**
36 * Returns the SpanContext associated with this exemplar. If the exemplar was not recorded
37 * inside a sampled trace, the Context will be invalid.
38 */
39 opentelemetry::context::Context GetSpanContext();
40 };
41
42 } // namespace metrics
43 } // namespace sdk
44 OPENTELEMETRY_END_NAMESPACE
45 #endif