pub struct TelemetryConfig {Show 14 fields
pub service_name: String,
pub enable_jaeger: bool,
pub tokio_console: bool,
pub json_log_output: bool,
pub span_log_output: bool,
pub chrome_trace_output: bool,
pub log_file: Option<String>,
pub log_string: Option<String>,
pub span_level: Option<Level>,
pub panic_hook: bool,
pub crash_on_panic: bool,
pub prom_registry: Option<Registry>,
pub custom_layers: Vec<Box<dyn Layer<Registry> + Send + Sync + 'static>>,
pub custom_filter: Option<Box<dyn Filter<Registry> + Send + Sync>>,
}Expand description
§Configuration for different logging/tracing options
- json_log_output: Output JSON logs to stdout only.
- log_file: If defined, write output to a file starting with this name, ex app.log
- log_level: error/warn/info/debug/trace, defaults to info
- service_name:
Fields§
§service_name: StringThe name of the service for Jaeger and Bunyan
enable_jaeger: bool§tokio_console: boolEnables Tokio Console debugging on port 6669
json_log_output: boolOutput JSON logs.
span_log_output: boolOutput span start/close to regular logs, controlled using regular RUST_LOG levels
chrome_trace_output: boolWrite chrome trace output, which can be loaded from chrome://tracing
log_file: Option<String>If defined, write output to a file starting with this name, ex app.log
log_string: Option<String>Log level to set, defaults to info
span_level: Option<Level>Span level - what level of spans should be created. Note this is not same as logging level If set to None, then defaults to INFO
panic_hook: boolSet a panic hook
crash_on_panic: boolCrash on panic
prom_registry: Option<Registry>Optional Prometheus registry - if present, all enabled span latencies are measured
custom_layers: Vec<Box<dyn Layer<Registry> + Send + Sync + 'static>>Pass in any additional custom layers that the consumer wants their subscriber to be created with
custom_filter: Option<Box<dyn Filter<Registry> + Send + Sync>>Pass in any custom filter that will be applied along with the default filter