pub struct MetricsExporter { /* private fields */ }Expand description
Metrics exporter for workflow analytics
Implementations§
Source§impl MetricsExporter
impl MetricsExporter
Sourcepub fn with_label(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_label( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Add a label/tag to all exported metrics
Sourcepub fn with_namespace(self, namespace: impl Into<String>) -> Self
pub fn with_namespace(self, namespace: impl Into<String>) -> Self
Set the namespace for metrics
Sourcepub fn export_prometheus(
&self,
analytics: &WorkflowAnalytics,
) -> Result<String, MetricsError>
pub fn export_prometheus( &self, analytics: &WorkflowAnalytics, ) -> Result<String, MetricsError>
Export analytics to Prometheus text format
Sourcepub fn export_opentelemetry(
&self,
analytics: &WorkflowAnalytics,
) -> Result<Value, MetricsError>
pub fn export_opentelemetry( &self, analytics: &WorkflowAnalytics, ) -> Result<Value, MetricsError>
Export analytics to OpenTelemetry JSON format
Sourcepub fn export_influxdb(
&self,
analytics: &WorkflowAnalytics,
) -> Result<String, MetricsError>
pub fn export_influxdb( &self, analytics: &WorkflowAnalytics, ) -> Result<String, MetricsError>
Export analytics to InfluxDB line protocol
Sourcepub fn export_json(
&self,
analytics: &WorkflowAnalytics,
) -> Result<Value, MetricsError>
pub fn export_json( &self, analytics: &WorkflowAnalytics, ) -> Result<Value, MetricsError>
Export analytics to generic JSON format
Sourcepub fn export(
&self,
analytics: &WorkflowAnalytics,
format: ExportFormat,
) -> Result<String, MetricsError>
pub fn export( &self, analytics: &WorkflowAnalytics, format: ExportFormat, ) -> Result<String, MetricsError>
Export analytics in the specified format
Trait Implementations§
Source§impl Clone for MetricsExporter
impl Clone for MetricsExporter
Source§fn clone(&self) -> MetricsExporter
fn clone(&self) -> MetricsExporter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MetricsExporter
impl RefUnwindSafe for MetricsExporter
impl Send for MetricsExporter
impl Sync for MetricsExporter
impl Unpin for MetricsExporter
impl UnwindSafe for MetricsExporter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more