pub struct ExporterBuilder { /* private fields */ }
Expand description
Configuration for the prometheus exporter.
Implementations§
source§impl ExporterBuilder
impl ExporterBuilder
sourcepub fn new(controller: BasicController) -> Self
pub fn new(controller: BasicController) -> Self
Create a new exporter builder with a given controller
sourcepub fn with_registry(self, registry: Registry) -> Self
pub fn with_registry(self, registry: Registry) -> Self
Set the prometheus registry to be used by this exporter
sourcepub fn with_config(self, config: ExporterConfig) -> Self
pub fn with_config(self, config: ExporterConfig) -> Self
Set config to be used by this exporter
sourcepub fn try_init(self) -> Result<PrometheusExporter, MetricsError>
pub fn try_init(self) -> Result<PrometheusExporter, MetricsError>
Sets up a complete export pipeline with the recommended setup, using the recommended selector and standard processor.
sourcepub fn init(self) -> PrometheusExporter
pub fn init(self) -> PrometheusExporter
Sets up a complete export pipeline with the recommended setup, using the recommended selector and standard processor.
Panics
This panics if the exporter cannot be registered in the prometheus registry.