Struct iroh_metrics::config::Config
source · pub struct Config {
pub service_name: String,
pub instance_id: String,
pub build: String,
pub version: String,
pub service_env: String,
pub collect: bool,
pub tracing: bool,
pub collector_endpoint: String,
pub prom_gateway_endpoint: String,
}
Fields§
§service_name: String
The name of the service. Should be the same as the Cargo package name.
instance_id: String
A unique identifier for this instance of the service.
build: String
The build version of the service (commit hash).
version: String
The version of the service. Should be the same as the Cargo package version.
service_env: String
The environment of the service.
collect: bool
Flag to enable metrics collection.
tracing: bool
Flag to enable tracing collection.
collector_endpoint: String
The endpoint of the trace collector.
prom_gateway_endpoint: String
The endpoint of the prometheus push gateway.
Implementations§
source§impl Config
impl Config
pub fn with_service_name(self, name: String) -> Self
pub fn with_build(self, build: String) -> Self
pub fn with_version(self, version: String) -> Self
Trait Implementations§
source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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<Config> for Config
impl PartialEq<Config> for Config
source§impl Source for Config
impl Source for Config
fn clone_into_box(&self) -> Box<dyn Source + Send + Sync>
source§fn collect(&self) -> Result<Map<String, Value>, ConfigError>
fn collect(&self) -> Result<Map<String, Value>, ConfigError>
Collect all configuration properties available from this source and return
a Map.
source§fn collect_to(&self, cache: &mut Value) -> Result<(), ConfigError>
fn collect_to(&self, cache: &mut Value) -> Result<(), ConfigError>
Collects all configuration properties to a provided cache.
impl Eq for Config
impl StructuralEq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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