Class MeterContextFactory
Defined in File meter_context_factory.h
Class Documentation
-
class MeterContextFactory
Factory class for MeterContext.
Public Static Functions
-
static std::unique_ptr<MeterContext> Create()
Create a MeterContext with valid defaults.
- Returns:
A unique pointer to the created MeterContext object.
-
static std::unique_ptr<MeterContext> Create(std::unique_ptr<ViewRegistry> views)
Create a MeterContext with specified views.
- Parameters:
views – ViewRegistry containing OpenTelemetry views registered with this meter context.
-
static std::unique_ptr<MeterContext> Create(std::unique_ptr<ViewRegistry> views, const opentelemetry::sdk::resource::Resource &resource)
Create a MeterContext with specified views and resource.
- Parameters:
views – ViewRegistry containing OpenTelemetry views registered with this meter context.
resource – The OpenTelemetry resource associated with this meter context.
- Returns:
A unique pointer to the created MeterContext object.
-
static std::unique_ptr<MeterContext> Create(std::unique_ptr<ViewRegistry> views, const opentelemetry::sdk::resource::Resource &resource, std::unique_ptr<instrumentationscope::ScopeConfigurator<MeterConfig>> meter_configurator)
Create a MeterContext with specified views, resource and meter scope configurator.
- Parameters:
views – ViewRegistry containing OpenTelemetry views registered with this meter context.
resource – The OpenTelemetry resource associated with this meter context.
meter_configurator – A scope configurator defining the behavior of a meter associated with this meter context.
- Returns:
A unique pointer to the created MeterContext object.
-
static std::unique_ptr<MeterContext> Create()