NVIDIA DeepStream SDK API Reference

9.2 Release
includes/opentelemetry/sdk/metrics/aggregation/aggregation.h
Go to the documentation of this file.
1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
3 
4 #pragma once
5 
6 #include <stdint.h>
7 #include <memory>
8 #include "opentelemetry/sdk/metrics/data/metric_data.h"
9 #include "opentelemetry/version.h"
10 
12 namespace sdk
13 {
14 namespace metrics
15 {
17 {
18 public:
19  virtual void Aggregate(int64_t value, const PointAttributes &attributes = {}) noexcept = 0;
20 
21  virtual void Aggregate(double value, const PointAttributes &attributes = {}) noexcept = 0;
22 
33  virtual std::unique_ptr<Aggregation> Merge(const Aggregation &delta) const noexcept = 0;
34 
41  virtual std::unique_ptr<Aggregation> Diff(const Aggregation &next) const noexcept = 0;
42 
49  virtual PointType ToPoint() const noexcept = 0;
50 
51  virtual ~Aggregation() = default;
52 };
53 
54 } // namespace metrics
55 } // namespace sdk
sdk::metrics::Aggregation::~Aggregation
virtual ~Aggregation()=default
sdk::metrics::PointAttributes
opentelemetry::sdk::common::OrderedAttributeMap PointAttributes
Definition: includes/opentelemetry/sdk/metrics/data/metric_data.h:20
OPENTELEMETRY_BEGIN_NAMESPACE
#define OPENTELEMETRY_BEGIN_NAMESPACE
Definition: includes/opentelemetry/version.h:21
OPENTELEMETRY_END_NAMESPACE
#define OPENTELEMETRY_END_NAMESPACE
Definition: includes/opentelemetry/version.h:24
sdk::metrics::Aggregation::Merge
virtual std::unique_ptr< Aggregation > Merge(const Aggregation &delta) const noexcept=0
Returns the result of the merge of the two aggregations.
sdk::metrics::Aggregation::Diff
virtual std::unique_ptr< Aggregation > Diff(const Aggregation &next) const noexcept=0
Returns a new delta aggregation by comparing two cumulative measurements.
sdk::metrics::Aggregation
Definition: includes/opentelemetry/sdk/metrics/aggregation/aggregation.h:16
sdk::metrics::Aggregation::ToPoint
virtual PointType ToPoint() const noexcept=0
Returns the point data that the aggregation will produce.
sdk
Definition: includes/opentelemetry/sdk/common/atomic_shared_ptr.h:13
metrics
Definition: includes/opentelemetry/metrics/async_instruments.h:10
sdk::metrics::PointType
opentelemetry::nostd::variant< SumPointData, HistogramPointData, Base2ExponentialHistogramPointData, LastValuePointData, DropPointData > PointType
Definition: includes/opentelemetry/sdk/metrics/data/metric_data.h:25
sdk::metrics::Aggregation::Aggregate
virtual void Aggregate(int64_t value, const PointAttributes &attributes={}) noexcept=0