NVIDIA DeepStream SDK API Reference

9.2 Release
includes/opentelemetry/metrics/meter.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 "opentelemetry/nostd/shared_ptr.h"
7 #include "opentelemetry/nostd/string_view.h"
8 #include "opentelemetry/nostd/unique_ptr.h"
9 #include "opentelemetry/version.h"
10 
12 namespace metrics
13 {
14 
15 template <typename T>
16 class Counter;
17 
18 template <typename T>
19 class Histogram;
20 
21 template <typename T>
23 
24 template <typename T>
25 class Gauge;
26 
28 
37 class Meter
38 {
39 public:
40  virtual ~Meter() = default;
41 
52  nostd::string_view name,
53  nostd::string_view description = "",
54  nostd::string_view unit = "") noexcept = 0;
55 
57  nostd::string_view name,
58  nostd::string_view description = "",
59  nostd::string_view unit = "") noexcept = 0;
60 
70  nostd::string_view name,
71  nostd::string_view description = "",
72  nostd::string_view unit = "") noexcept = 0;
73 
75  nostd::string_view name,
76  nostd::string_view description = "",
77  nostd::string_view unit = "") noexcept = 0;
78 
88  nostd::string_view name,
89  nostd::string_view description = "",
90  nostd::string_view unit = "") noexcept = 0;
91 
93  nostd::string_view name,
94  nostd::string_view description = "",
95  nostd::string_view unit = "") noexcept = 0;
96 
97 #if OPENTELEMETRY_ABI_VERSION_NO >= 2
98 
107  virtual nostd::unique_ptr<Gauge<int64_t>> CreateInt64Gauge(
108  nostd::string_view name,
109  nostd::string_view description = "",
110  nostd::string_view unit = "") noexcept = 0;
111 
112  virtual nostd::unique_ptr<Gauge<double>> CreateDoubleGauge(
113  nostd::string_view name,
114  nostd::string_view description = "",
115  nostd::string_view unit = "") noexcept = 0;
116 #endif
117 
127  nostd::string_view name,
128  nostd::string_view description = "",
129  nostd::string_view unit = "") noexcept = 0;
130 
132  nostd::string_view name,
133  nostd::string_view description = "",
134  nostd::string_view unit = "") noexcept = 0;
135 
146  nostd::string_view name,
147  nostd::string_view description = "",
148  nostd::string_view unit = "") noexcept = 0;
149 
151  nostd::string_view name,
152  nostd::string_view description = "",
153  nostd::string_view unit = "") noexcept = 0;
154 
164  nostd::string_view name,
165  nostd::string_view description = "",
166  nostd::string_view unit = "") noexcept = 0;
167 
169  nostd::string_view name,
170  nostd::string_view description = "",
171  nostd::string_view unit = "") noexcept = 0;
172 };
173 } // namespace metrics
metrics::Meter::CreateInt64ObservableGauge
virtual nostd::shared_ptr< ObservableInstrument > CreateInt64ObservableGauge(nostd::string_view name, nostd::string_view description="", nostd::string_view unit="") noexcept=0
Creates a Asynchronous (Observable) Gauge with the passed characteristics and returns a shared_ptr to...
metrics::Gauge
Definition: includes/opentelemetry/metrics/meter.h:25
metrics::Meter::CreateInt64UpDownCounter
virtual nostd::unique_ptr< UpDownCounter< int64_t > > CreateInt64UpDownCounter(nostd::string_view name, nostd::string_view description="", nostd::string_view unit="") noexcept=0
Creates an UpDownCounter with the passed characteristics and returns a unique_ptr to that UpDownCount...
metrics::Meter::~Meter
virtual ~Meter()=default
metrics::Histogram
A histogram instrument that records values.
Definition: includes/opentelemetry/metrics/meter.h:19
nostd::unique_ptr
Provide a simplified port of std::unique_ptr that has ABI stability.
Definition: includes/opentelemetry/nostd/unique_ptr.h:45
nostd::shared_ptr
Provide a type-erased version of std::shared_ptr that has ABI stability.
Definition: includes/opentelemetry/nostd/shared_ptr.h:28
metrics::Meter::CreateDoubleHistogram
virtual nostd::unique_ptr< Histogram< double > > CreateDoubleHistogram(nostd::string_view name, nostd::string_view description="", nostd::string_view unit="") noexcept=0
OPENTELEMETRY_BEGIN_NAMESPACE
#define OPENTELEMETRY_BEGIN_NAMESPACE
Definition: includes/opentelemetry/version.h:21
metrics::Counter
Definition: includes/opentelemetry/metrics/meter.h:16
metrics::Meter::CreateDoubleObservableUpDownCounter
virtual nostd::shared_ptr< ObservableInstrument > CreateDoubleObservableUpDownCounter(nostd::string_view name, nostd::string_view description="", nostd::string_view unit="") noexcept=0
metrics::Meter::CreateDoubleCounter
virtual nostd::unique_ptr< Counter< double > > CreateDoubleCounter(nostd::string_view name, nostd::string_view description="", nostd::string_view unit="") noexcept=0
metrics::Meter::CreateDoubleObservableCounter
virtual nostd::shared_ptr< ObservableInstrument > CreateDoubleObservableCounter(nostd::string_view name, nostd::string_view description="", nostd::string_view unit="") noexcept=0
OPENTELEMETRY_END_NAMESPACE
#define OPENTELEMETRY_END_NAMESPACE
Definition: includes/opentelemetry/version.h:24
metrics::Meter::CreateUInt64Counter
virtual nostd::unique_ptr< Counter< uint64_t > > CreateUInt64Counter(nostd::string_view name, nostd::string_view description="", nostd::string_view unit="") noexcept=0
Creates a Counter with the passed characteristics and returns a unique_ptr to that Counter.
metrics::Meter::CreateInt64ObservableUpDownCounter
virtual nostd::shared_ptr< ObservableInstrument > CreateInt64ObservableUpDownCounter(nostd::string_view name, nostd::string_view description="", nostd::string_view unit="") noexcept=0
Creates a Asynchronous (Observable) UpDownCounter with the passed characteristics and returns a share...
metrics::Meter::CreateInt64ObservableCounter
virtual nostd::shared_ptr< ObservableInstrument > CreateInt64ObservableCounter(nostd::string_view name, nostd::string_view description="", nostd::string_view unit="") noexcept=0
Creates a Asynchronous (Observable) counter with the passed characteristics and returns a shared_ptr ...
metrics::Meter::CreateDoubleUpDownCounter
virtual nostd::unique_ptr< UpDownCounter< double > > CreateDoubleUpDownCounter(nostd::string_view name, nostd::string_view description="", nostd::string_view unit="") noexcept=0
metrics::Meter::CreateDoubleObservableGauge
virtual nostd::shared_ptr< ObservableInstrument > CreateDoubleObservableGauge(nostd::string_view name, nostd::string_view description="", nostd::string_view unit="") noexcept=0
metrics::UpDownCounter
An up-down-counter instrument that adds or reduce values.
Definition: includes/opentelemetry/metrics/meter.h:22
metrics::ObservableInstrument
Definition: includes/opentelemetry/metrics/async_instruments.h:15
metrics
Definition: includes/opentelemetry/metrics/async_instruments.h:10
metrics::Meter::CreateUInt64Histogram
virtual nostd::unique_ptr< Histogram< uint64_t > > CreateUInt64Histogram(nostd::string_view name, nostd::string_view description="", nostd::string_view unit="") noexcept=0
Creates a Histogram with the passed characteristics and returns a unique_ptr to that Histogram.
metrics::Meter
Handles instrument creation and provides a facility for batch recording.
Definition: includes/opentelemetry/metrics/meter.h:37
nostd::string_view
Back port of std::string_view to work with pre-cpp-17 compilers.
Definition: includes/opentelemetry/nostd/string_view.h:37