mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-29 03:47:33 +00:00
feat(metrics): Record metrics with OpenTelemetry and export over OTLP
This commit is contained in:
1 parent
e96b6e6665
commit
5185045cb6
33 files changed
+1118
-455
No files matched your search
+8
-3
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user