pub struct PrometheusExporterOptions {
pub socket_addr: SocketAddr,
pub global_tags: HashMap<String, String>,
pub counters_total_suffix: bool,
pub unit_suffix: bool,
pub use_seconds_for_durations: bool,
pub histogram_bucket_overrides: HistogramBucketOverrides,
}Expand description
Options for exporting metrics to Prometheus
Fields§
§socket_addr: SocketAddrThe address the Prometheus exporter HTTP server will bind to.
A map of tags to be applied to all metrics
counters_total_suffix: boolIf set true, all counters will include a “_total” suffix
unit_suffix: boolIf set true, all histograms will include the unit in their name as a suffix. Ex: “_milliseconds”.
use_seconds_for_durations: boolIf set to true, use f64 seconds for durations instead of u64 milliseconds
histogram_bucket_overrides: HistogramBucketOverridesOverrides for histogram buckets. Units depend on the value of use_seconds_for_durations.
Implementations§
Source§impl PrometheusExporterOptions
impl PrometheusExporterOptions
Sourcepub fn builder() -> PrometheusExporterOptionsBuilder
pub fn builder() -> PrometheusExporterOptionsBuilder
Create an instance of PrometheusExporterOptions using the builder syntax
Trait Implementations§
Source§impl Clone for PrometheusExporterOptions
impl Clone for PrometheusExporterOptions
Source§fn clone(&self) -> PrometheusExporterOptions
fn clone(&self) -> PrometheusExporterOptions
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 PrometheusExporterOptions
impl RefUnwindSafe for PrometheusExporterOptions
impl Send for PrometheusExporterOptions
impl Sync for PrometheusExporterOptions
impl Unpin for PrometheusExporterOptions
impl UnsafeUnpin for PrometheusExporterOptions
impl UnwindSafe for PrometheusExporterOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request