mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
Make observability more configurable
The following are now configurable: - the OpenTelemetry endpoint, - the tracing-flame filename, and - whether the log output should include timestamps (useful to disable if it goes straight into journald).
This commit is contained in:
parent
df571818f1
commit
e0e7d8fd91
2 changed files with 40 additions and 3 deletions
|
|
@ -185,6 +185,7 @@ pub(crate) struct MetricsConfig {
|
|||
pub(crate) struct OtelTraceConfig {
|
||||
pub(crate) enable: bool,
|
||||
pub(crate) filter: EnvFilterClone,
|
||||
pub(crate) endpoint: Option<String>,
|
||||
}
|
||||
|
||||
impl Default for OtelTraceConfig {
|
||||
|
|
@ -192,6 +193,7 @@ impl Default for OtelTraceConfig {
|
|||
Self {
|
||||
enable: false,
|
||||
filter: default_tracing_filter(),
|
||||
endpoint: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -201,6 +203,7 @@ impl Default for OtelTraceConfig {
|
|||
pub(crate) struct FlameConfig {
|
||||
pub(crate) enable: bool,
|
||||
pub(crate) filter: EnvFilterClone,
|
||||
pub(crate) filename: String,
|
||||
}
|
||||
|
||||
impl Default for FlameConfig {
|
||||
|
|
@ -208,6 +211,7 @@ impl Default for FlameConfig {
|
|||
Self {
|
||||
enable: false,
|
||||
filter: default_tracing_filter(),
|
||||
filename: "./tracing.folded".to_owned(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -218,6 +222,7 @@ pub(crate) struct LogConfig {
|
|||
pub(crate) filter: EnvFilterClone,
|
||||
pub(crate) colors: bool,
|
||||
pub(crate) format: LogFormat,
|
||||
pub(crate) timestamp: bool,
|
||||
}
|
||||
|
||||
impl Default for LogConfig {
|
||||
|
|
@ -226,6 +231,7 @@ impl Default for LogConfig {
|
|||
filter: default_tracing_filter(),
|
||||
colors: true,
|
||||
format: LogFormat::default(),
|
||||
timestamp: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue