IObservability#
Fully qualified name: omni::observability::IObservability
Defined in omni/observability/IObservability.h
-
class IObservability#
Common interface to help with setting up telemetry related functionality in Carbonite based projects.
This is responsible for the high level setup and configuration of observability features. Much of the setup is performed implicitly when the plugin containing this interface is loaded and started.
The configuration largely comes from environment variables specified by the OpenTelemetry configuration specification. Many of the configuration options listed in that specification are supported and respected here. Other Carbonite settings that mirror the OpenTelemetry environment variables are also supported, but the environment variables will always take precedence. The full supported settings and environment variables listing can be found in the overview documentation for the observability features.
Public Functions
- virtual carb::ObjectPtr<IMeter> createMeter(
- carb::cpp::string_view name,
- carb::cpp::string_view version = "",
- carb::cpp::string_view schemaUrl = "",
Create a meter for collecting metrics.
- Parameters:
name – [in] The name of the meter.
version – [in] The version of the meter (optional).
schemaUrl – [in] The schema URL for the meter (optional).
- Returns:
A carb::ObjectPtr to the created meter, or nullptr on failure.
-
virtual void flush() = 0#
Flush all pending telemetry data.
Remark
This forces the immediate export of any buffered telemetry data including metrics, logs, and traces to their configured destinations.
Public Static Functions
- static inline constexpr carb::InterfaceDesc getInterfaceDesc(
Returns information about this interface.
Auto-generated by CARB_PLUGIN_INTERFACE() or CARB_PLUGIN_INTERFACE_EX.
- Returns:
The carb::InterfaceDesc struct with information about this interface.
- static inline constexpr carb::InterfaceDesc getLatestInterfaceDesc(
Returns information about the latest version of this interface.
Auto-generated by CARB_PLUGIN_INTERFACE() or CARB_PLUGIN_INTERFACE_EX.
- Returns:
The carb::InterfaceDesc struct with information about the latest version of this interface.