feat(controller/reporting): reconcile-rspecific measurements & prometheus metric retains tracing messages
This commit is contained in:
parent
843ba014aa
commit
683869982f
1 changed files with 196 additions and 17 deletions
|
|
@ -1,2 +1,24 @@
|
|||
use confique::Config;
|
||||
|
||||
pub mod prometheus;
|
||||
pub mod tracing_evt;
|
||||
|
||||
#[derive(Config)]
|
||||
pub struct ReportingConfig {
|
||||
#[config(env = "KUYASEG_REPORT_K8S")]
|
||||
#[config(default = true)]
|
||||
pub k8s_events: bool,
|
||||
#[config(env = "KUYASEG_REPORT_PROMETHEUS")]
|
||||
#[config(default = false)]
|
||||
pub prometheus: bool,
|
||||
#[config(env = "KUYASEG_REPORT_OTEL")]
|
||||
#[config(default = false)]
|
||||
pub opentelemetry: bool,
|
||||
}
|
||||
|
||||
pub fn trace_id_str(trace_id: &opentelemetry::TraceId) -> Option<String> {
|
||||
match trace_id {
|
||||
&opentelemetry::TraceId::INVALID => None,
|
||||
x => Some(x.to_string()),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue