AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
NoopMeterProvider.h
1
5#pragma once
6
7#include <smithy/Smithy_EXPORTS.h>
8#include <smithy/tracing/MeterProvider.h>
9
10
11namespace smithy {
12 namespace components {
13 namespace tracing {
19 public:
20 void Stop() override {}
21 };
22
28 void add(long value, Aws::Map<Aws::String, Aws::String> attributes) override {
29 AWS_UNREFERENCED_PARAM(value);
30 AWS_UNREFERENCED_PARAM(attributes);
31 }
32 };
33
39 void add(long value, Aws::Map<Aws::String, Aws::String> attributes) override {
40 AWS_UNREFERENCED_PARAM(value);
41 AWS_UNREFERENCED_PARAM(attributes);
42 }
43 };
44
49 class NoopHistogram : public Histogram {
50 public:
51 void record(double value, Aws::Map<Aws::String, Aws::String> attributes) override {
52 AWS_UNREFERENCED_PARAM(value);
53 AWS_UNREFERENCED_PARAM(attributes);
54 }
55 };
56
61 class NoopMeter : public Meter {
62 public:
64 std::function<void(Aws::UniquePtr<AsyncMeasurement>)> callback,
65 Aws::String units,
66 Aws::String description) const override
67 {
68 AWS_UNREFERENCED_PARAM(name);
69 AWS_UNREFERENCED_PARAM(callback);
70 AWS_UNREFERENCED_PARAM(units);
71 AWS_UNREFERENCED_PARAM(description);
72 return Aws::MakeUnique<NoopGaugeHandle>("NO_OP");
73 }
74
76 Aws::String units,
77 Aws::String description) const override
78 {
79 AWS_UNREFERENCED_PARAM(name);
80 AWS_UNREFERENCED_PARAM(units);
81 AWS_UNREFERENCED_PARAM(description);
82 return Aws::MakeUnique<NoopUpDownCounter>("NO_OP");
83 }
84
86 Aws::String units,
87 Aws::String description) const override
88 {
89 AWS_UNREFERENCED_PARAM(name);
90 AWS_UNREFERENCED_PARAM(units);
91 AWS_UNREFERENCED_PARAM(description);
92 return Aws::MakeUnique<NoopMonotonicCounter>("NO_OP");
93 }
94
96 Aws::String units,
97 Aws::String description) const override
98 {
99 AWS_UNREFERENCED_PARAM(name);
100 AWS_UNREFERENCED_PARAM(units);
101 AWS_UNREFERENCED_PARAM(description);
102 return Aws::MakeUnique<NoopHistogram>("NO_OP");
103 }
104 };
105
111 public:
112 std::shared_ptr<Meter>
114 {
115 AWS_UNREFERENCED_PARAM(scope);
116 AWS_UNREFERENCED_PARAM(attributes);
117 return Aws::MakeShared<NoopMeter>("NO_OP");
118 }
119 };
120 }
121 }
122}
void record(double value, Aws::Map< Aws::String, Aws::String > attributes) override
Aws::UniquePtr< GaugeHandle > CreateGauge(Aws::String name, std::function< void(Aws::UniquePtr< AsyncMeasurement >)> callback, Aws::String units, Aws::String description) const override
Aws::UniquePtr< MonotonicCounter > CreateCounter(Aws::String name, Aws::String units, Aws::String description) const override
Aws::UniquePtr< UpDownCounter > CreateUpDownCounter(Aws::String name, Aws::String units, Aws::String description) const override
Aws::UniquePtr< Histogram > CreateHistogram(Aws::String name, Aws::String units, Aws::String description) const override
std::shared_ptr< Meter > GetMeter(Aws::String scope, Aws::Map< Aws::String, Aws::String > attributes) override
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition AWSMap.h:20
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition AWSString.h:97
std::unique_ptr< T, D > UniquePtr
Definition AWSMemory.h:255