1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
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"
10 OPENTELEMETRY_BEGIN_NAMESPACE
15 using MetricAttributes
= opentelemetry::sdk::common::OrderedAttributeMap
;
17 * A sample input measurement.
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.
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
30 MetricAttributes
GetFilteredAttributes();
32 /** Returns the timestamp in nanos when measurement was collected. */
33 opentelemetry::common::SystemTimestamp
GetEpochNanos();
36 * Returns the SpanContext associated with this exemplar. If the exemplar was not recorded
37 * inside a sampled trace, the Context will be invalid.
39 opentelemetry::context::Context
GetSpanContext();
42 } // namespace metrics
44 OPENTELEMETRY_END_NAMESPACE