pub struct PushMetricsConfig {
pub interval: u64,
pub endpoint: String,
pub service_name: String,
pub instance_name: String,
pub username: Option<String>,
pub password: String,
}
Expand description
Configuration for pushing metrics to a remote endpoint.
Fields§
§interval: u64
The push interval in seconds.
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 PushMetricsConfig
impl Clone for PushMetricsConfig
Source§fn clone(&self) -> PushMetricsConfig
fn clone(&self) -> PushMetricsConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for PushMetricsConfig
impl Debug for PushMetricsConfig
Source§impl Default for PushMetricsConfig
impl Default for PushMetricsConfig
Source§fn default() -> PushMetricsConfig
fn default() -> PushMetricsConfig
Source§impl<'de> Deserialize<'de> for PushMetricsConfig
impl<'de> Deserialize<'de> for PushMetricsConfig
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>,
Source§impl PartialEq for PushMetricsConfig
impl PartialEq for PushMetricsConfig
impl Eq for PushMetricsConfig
impl StructuralPartialEq for PushMetricsConfig
Auto Trait Implementations§
impl Freeze for PushMetricsConfig
impl RefUnwindSafe for PushMetricsConfig
impl Send for PushMetricsConfig
impl Sync for PushMetricsConfig
impl Unpin for PushMetricsConfig
impl UnwindSafe for PushMetricsConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)