observability#
Fully qualified name: omni::observability
-
namespace observability#
Main namespace for observability related functionality.
Namespace for observability functionality.
This includes telemetry, metrics, and traces. Crash reporting is also related to observability but has its own namespace.
Classes#
- ICounter
Counter instrument for monotonically increasing values.
- IHistogram
Histogram instrument for recording distributions of values.
- IMeter
Factory interface for creating metric instruments.
- IObservability
Common interface to help with setting up telemetry related functionality in Carbonite based projects.
- IObservabilityProvider
Direct interface for observability functionality based on OpenTelemetry.
- IObservableInstrument
Observable instrument that is sampled via callback.
- IUpDownCounter
Up/down counter instrument for values that can increase or decrease.
- LogMetadata
Metadata storage for a single log message.
- Logger
Logger base class.
- RefCountedObject
Base class object used to support simple reference counting in an object.
- SilentLogger
Simple logger implementation that will silence internal log messages on stderr coming from the
omni.observability.corelibrary.- State
Wrapper object to manage the lifetime of the telemetry system.
Functions#
- IObservabilityProvider * acquireIObservabilityProvider()
Acquire the main IObservabilityProvider interface.
- void add(const carb::ObjectPtr< ICounter< ValueType > > &counter, T value, A &&… a) noexcept
Add a value to a counter with variadic attributes.
- void add(const carb::ObjectPtr< ICounter< ValueType > > &counter, T value, std::initializer_list< Attribute > attributes) noexcept
Add a value to a counter with initializer list attributes.
- void add(const carb::ObjectPtr< IUpDownCounter< ValueType > > &upDownCounter, T value, std::initializer_list< Attribute > attributes) noexcept
Add a value to an up/down counter with initializer list attributes.
- void add(const carb::ObjectPtr< IUpDownCounter< ValueType > > &upDownCounter, T value, A &&… a) noexcept
Add a value to an up/down counter with variadic attributes.
- void addArr(const carb::ObjectPtr< ICounter< ValueType > > &counter, T value, const Attribute attributes[], std::size_t attributeCount) noexcept
Add a value to a counter with array attributes.
- void addArr(const carb::ObjectPtr< IUpDownCounter< ValueType > > &upDownCounter, T value, const Attribute attributes[], std::size_t attributeCount) noexcept
Add a value to an up/down counter with array attributes.
- carb::ObjectPtr< ICounter< ValueType > > createCounter(const carb::ObjectPtr< IMeter > &meter, carb::cpp::string_view name, carb::cpp::string_view description, carb::cpp::string_view unit="")
Create a counter instrument with the specified ValueType.
- carb::ObjectPtr< IHistogram< ValueType > > createHistogram(const carb::ObjectPtr< IMeter > &meter, carb::cpp::string_view name, carb::cpp::string_view description, carb::cpp::string_view unit="")
Create a histogram instrument with the specified ValueType.
- carb::ObjectPtr< IObservableInstrument > createObservableCounter(const carb::ObjectPtr< IMeter > &meter, ObservableInstrumentCallback< ValueType > callback, void *context, carb::cpp::string_view name, carb::cpp::string_view description, carb::cpp::string_view unit="")
Create an observable counter instrument with the specified ValueType.
- carb::ObjectPtr< IObservableInstrument > createObservableUpDownCounter(const carb::ObjectPtr< IMeter > &meter, ObservableInstrumentCallback< ValueType > callback, void *context, carb::cpp::string_view name, carb::cpp::string_view description, carb::cpp::string_view unit="")
Create an observable up/down counter instrument with the specified ValueType.
- carb::ObjectPtr< IUpDownCounter< ValueType > > createUpDownCounter(const carb::ObjectPtr< IMeter > &meter, carb::cpp::string_view name, carb::cpp::string_view description, carb::cpp::string_view unit="")
Create an up/down counter instrument with the specified ValueType.
- const char * getLogLevelName(LogLevel level)
Retrieves the name of a given log level.
- void record(const carb::ObjectPtr< IHistogram< ValueType > > &histogram, T value, A &&… a) noexcept
Record a value in a histogram with variadic attributes.
- void record(const carb::ObjectPtr< IHistogram< ValueType > > &histogram, T value, std::initializer_list< Attribute > attributes) noexcept
Record a value in a histogram with initializer list attributes.
- void recordArr(const carb::ObjectPtr< IHistogram< ValueType > > &histogram, T value, const Attribute attributes[], std::size_t attributeCount) noexcept
Record a value in a histogram with array attributes.
Structs#
- InitializeDesc
Descriptor used to initialize telemetry.
Typedefs#
- Attribute
Attributes are key-value pairs where the key is a static string (e.g.
- InstrumentObserver
Type alias for omni.otel instrument observer.
- LogLevel
Base type for a log level value.
- LoggerId
An identifier of a single registered logger.
- ObservableInstrumentCallback
Type alias for omni.otel observable instrument callback.
- ProcessId
A unique identifier for a process.
- ResourcePair
Base type used to define a key/value pair used to define a single item to be added to the
resourceblock of each telemetry signal.- ThreadId
A unique identifier for a thread.
Variables#
- constexpr int32_t kDefaultEmitLevelSetting
The default value for the kEmitLevelSetting setting.
- constexpr char kEmitLevelSetting
Setting path to control the minimum log level that should be emitted over OTLP.
- constexpr LoggerId kInvalidLoggerId
The identifier of an invalid logger.
- constexpr LogLevel kLogLevelError
Error log level.
- constexpr LogLevel kLogLevelInfo
Info log level.
- constexpr LogLevel kLogLevelVerbose
Verbose log level.
- constexpr LogLevel kLogLevelWarn
Warning log level.
- constexpr char kOmniLogsSetupChannel
Channel name for core library logs setup log messages.
- constexpr char kOmniMetricsSetupChannel
Channel name for core library metrics setup log messages.
- constexpr char kOmniSettingsChannel
Channel name for settings related diagnostics.
- constexpr char kOmniTelemetrySetupChannel
Channel name for general core library setup log messages.
- constexpr char kOmniTracesSetupChannel
Channel name for core library traces setup log messages.