pub struct MetricsExporterConfig {
pub interval: Duration,
pub endpoint: String,
pub service_name: String,
pub instance_name: String,
pub username: Option<String>,
pub password: String,
}
Available on crate feature
service
only.Expand description
Configuration for pushing metrics to a remote endpoint.
Fields§
§interval: Duration
The push interval.
endpoint: String
The endpoint url for the push metrics collector.
service_name: String
The name of the service you’re exporting metrics for.
Generally, metrics_exporter
is good enough for use
outside of production deployments.
instance_name: String
The name of the instance you’re exporting metrics for.
This should be device-unique. If not, this will sum up metrics from different devices.
E.g. username-laptop
, username-phone
, etc.
Another potential scheme with good privacy would be a
keyed blake3 hash of the secret key. (This gives you
an identifier that is as unique as a NodeID
, but
can’t be correlated to NodeID
s.)
username: Option<String>
The username for basic auth for the push metrics collector.
password: String
The password for basic auth for the push metrics collector.
Trait Implementations§
Source§impl Clone for MetricsExporterConfig
impl Clone for MetricsExporterConfig
Source§fn clone(&self) -> MetricsExporterConfig
fn clone(&self) -> MetricsExporterConfig
Returns a copy 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 moreSource§impl Debug for MetricsExporterConfig
impl Debug for MetricsExporterConfig
Source§impl Default for MetricsExporterConfig
impl Default for MetricsExporterConfig
Source§fn default() -> MetricsExporterConfig
fn default() -> MetricsExporterConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MetricsExporterConfig
impl<'de> Deserialize<'de> for MetricsExporterConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MetricsExporterConfig
impl PartialEq for MetricsExporterConfig
impl Eq for MetricsExporterConfig
impl StructuralPartialEq for MetricsExporterConfig
Auto Trait Implementations§
impl Freeze for MetricsExporterConfig
impl RefUnwindSafe for MetricsExporterConfig
impl Send for MetricsExporterConfig
impl Sync for MetricsExporterConfig
impl Unpin for MetricsExporterConfig
impl UnwindSafe for MetricsExporterConfig
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