7#include <smithy/Smithy_EXPORTS.h>
8#include <smithy/tracing/Meter.h>
9#include <opentelemetry/nostd/shared_ptr.h>
10#include <opentelemetry/metrics/meter.h>
11#include <opentelemetry/metrics/observer_result.h>
12#include <opentelemetry/metrics/async_instruments.h>
16 namespace components {
23 explicit OtelMeterAdapter(opentelemetry::nostd::shared_ptr<opentelemetry::metrics::Meter> meter) :
24 otelMeter(std::move(meter)) {}
44 opentelemetry::nostd::shared_ptr<opentelemetry::metrics::Meter> otelMeter;
53 opentelemetry::nostd::unique_ptr<opentelemetry::metrics::Counter<uint64_t>> counter);
58 opentelemetry::nostd::unique_ptr<opentelemetry::metrics::Counter<uint64_t>> otelCounter;
67 opentelemetry::nostd::unique_ptr<opentelemetry::metrics::UpDownCounter<int64_t>> counter);
72 opentelemetry::nostd::unique_ptr<opentelemetry::metrics::UpDownCounter<int64_t>> otelUpDownCounter;
81 opentelemetry::nostd::unique_ptr<opentelemetry::metrics::Histogram<double>> otelHistogram);
87 opentelemetry::nostd::unique_ptr<opentelemetry::metrics::Histogram<double>> otelHistogram;
103 opentelemetry::nostd::shared_ptr<opentelemetry::metrics::ObservableInstrument> otelGauge,
104 opentelemetry::metrics::ObservableCallbackPtr callback);
109 opentelemetry::nostd::shared_ptr<opentelemetry::metrics::ObservableInstrument> otelGauge;
110 opentelemetry::metrics::ObservableCallbackPtr otelCallback;
123 const opentelemetry::metrics::ObserverResult &otelResult;
OtelCounterAdapter(opentelemetry::nostd::unique_ptr< opentelemetry::metrics::Counter< uint64_t > > counter)
void add(long value, Aws::Map< Aws::String, Aws::String > attributes) override
OtelGaugeAdapter(opentelemetry::nostd::shared_ptr< opentelemetry::metrics::ObservableInstrument > otelGauge, opentelemetry::metrics::ObservableCallbackPtr callback)
void record(double value, Aws::Map< Aws::String, Aws::String > attributes) override
OtelHistogramAdapter(opentelemetry::nostd::unique_ptr< opentelemetry::metrics::Histogram< double > > otelHistogram)
Aws::UniquePtr< Histogram > CreateHistogram(Aws::String name, Aws::String units, Aws::String description) const override
Aws::UniquePtr< GaugeHandle > CreateGauge(Aws::String name, std::function< void(Aws::UniquePtr< AsyncMeasurement >)> callback, Aws::String units, Aws::String description) const override
OtelMeterAdapter(opentelemetry::nostd::shared_ptr< opentelemetry::metrics::Meter > meter)
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
OtelObserverAdapter(const opentelemetry::metrics::ObserverResult &otelResult)
void Record(double value, const Aws::Map< Aws::String, Aws::String > &attributes) override
void add(long value, Aws::Map< Aws::String, Aws::String > attributes) override
OtelUpDownCounterAdapter(opentelemetry::nostd::unique_ptr< opentelemetry::metrics::UpDownCounter< int64_t > > counter)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::unique_ptr< T, D > UniquePtr
std::function< void(Aws::UniquePtr< AsyncMeasurement >)> callback