pub trait TelemetryConfig: Global {
// Provided methods
fn enabled(&self) -> bool { ... }
fn bind_address(&self) -> Option<SocketAddr> { ... }
fn http_server_name(&self) -> &str { ... }
fn health_check(&self) -> impl Future<Output = Result<(), Error>> + Send { ... }
fn prometheus_metrics_registry(&self) -> Option<&Registry> { ... }
fn opentelemetry(&self) -> Option<&OpenTelemetry> { ... }
}Provided Methods§
Sourcefn bind_address(&self) -> Option<SocketAddr>
fn bind_address(&self) -> Option<SocketAddr>
Return the bind address to listen on.
Sourcefn http_server_name(&self) -> &str
fn http_server_name(&self) -> &str
Return the http server name.
Sourcefn health_check(&self) -> impl Future<Output = Result<(), Error>> + Send
fn health_check(&self) -> impl Future<Output = Result<(), Error>> + Send
Return a health check to determine if the service is healthy.
Sourcefn prometheus_metrics_registry(&self) -> Option<&Registry>
fn prometheus_metrics_registry(&self) -> Option<&Registry>
Return a Prometheus metrics registry to scrape metrics from.
Sourcefn opentelemetry(&self) -> Option<&OpenTelemetry>
fn opentelemetry(&self) -> Option<&OpenTelemetry>
Pass an OpenTelemetry instance to the service. If provided the service will flush and shutdown the OpenTelemetry instance when the service shuts down.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.