/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace smithy { namespace components { namespace tracing { /** * Entry point to creating instruments. An Instrument is responsible for taking measurements. * The returned entities will be responsible for taking measurements directly in code. */ class SMITHY_API Meter { public: virtual ~Meter() = default; /** * Create a Gauge instrument that will measure a provided callback function. * @param name The metric name being recorded. * @param callback The callback function that will be recording the measurement * in a async runtime. * @param units The units of the measurement being recorded. * @param description The description of the measurement. * @return A handle to the gauge that has been created that has access to the * callback being used to record the metric. */ virtual Aws::UniquePtr CreateGauge(Aws::String name, std::function)> callback, Aws::String units, Aws::String description) const = 0; /** * Create a UpDownCounter that will measure a metric that can increase/decrease * in count. * * @param name The metric name being recorded. * @param units units The units of the measurement being recorded. * @param description The description of the measurement. * @return A UpDownCounter that can record the value of a count. */ virtual Aws::UniquePtr CreateUpDownCounter(Aws::String name, Aws::String units, Aws::String description) const = 0; /** * Create a Counter that will measure a metric that can only increase * in count. * * @param name The metric name being recorded. * @param units units The units of the measurement being recorded. * @param description The description of the measurement. * @return A Counter that can record the value of a count. */ virtual Aws::UniquePtr CreateCounter(Aws::String name, Aws::String units, Aws::String description) const = 0; /** * Create a Histogram that will measure a metric that can be translated * into a statistical measurement. * * @param name The metric name being recorded. * @param units units The units of the measurement being recorded. * @param description The description of the measurement. * @return A Histogram that can measure a statistical value. */ virtual Aws::UniquePtr CreateHistogram(Aws::String name, Aws::String units, Aws::String description) const = 0; }; } } }