feat(metrics): Record metrics with OpenTelemetry and export over OTLP

This commit is contained in:
Erwan Leboucher authored and Jade Ellis committed 2026-10-12 10:03:14 +01:00
1 parent e96b6e6665
commit 5185045cb6
33 files changed
+1118 -455

No files matched your search

+8 -3
View File
@@ -49,7 +49,12 @@ pub struct Server {
impl Server {
#[must_use]
pub fn new(config: Config, runtime: Option<runtime::Handle>, log: Log) -> Self {
pub fn new(
config: Config,
runtime: Option<runtime::Handle>,
log: Log,
metrics: Metrics,
) -> Self {
Self {
name: config.server_name.clone(),
config: config::Manager::new(config),
@@ -57,10 +62,10 @@ impl Server {
stopping: AtomicBool::new(false),
reloading: AtomicBool::new(false),
restarting: AtomicBool::new(false),
runtime: runtime.clone(),
runtime,
signal: broadcast::channel::<&'static str>(1).0,
log,
metrics: Metrics::new(runtime),
metrics,
}
}