mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-12-22 11:21:24 +00:00
Log console address, prometheus address with tracing
This commit is contained in:
parent
e7357cbdaf
commit
08472eabeb
2 changed files with 4 additions and 3 deletions
|
@ -44,8 +44,6 @@ where
|
||||||
.with(ErrorLayer::default());
|
.with(ErrorLayer::default());
|
||||||
|
|
||||||
if let Some(address) = tracing.console.address {
|
if let Some(address) = tracing.console.address {
|
||||||
println!("Starting console on {address}");
|
|
||||||
|
|
||||||
let console_layer = ConsoleLayer::builder()
|
let console_layer = ConsoleLayer::builder()
|
||||||
.event_buffer_capacity(tracing.console.buffer_capacity)
|
.event_buffer_capacity(tracing.console.buffer_capacity)
|
||||||
.server_addr(address)
|
.server_addr(address)
|
||||||
|
@ -53,7 +51,9 @@ where
|
||||||
|
|
||||||
let subscriber = subscriber.with(console_layer);
|
let subscriber = subscriber.with(console_layer);
|
||||||
|
|
||||||
with_subscriber(subscriber, &tracing.opentelemetry)
|
with_subscriber(subscriber, &tracing.opentelemetry)?;
|
||||||
|
tracing::info!("Starting console on {address}");
|
||||||
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
with_subscriber(subscriber, &tracing.opentelemetry)
|
with_subscriber(subscriber, &tracing.opentelemetry)
|
||||||
}
|
}
|
||||||
|
|
|
@ -2077,6 +2077,7 @@ impl PictRsConfiguration {
|
||||||
PrometheusBuilder::new()
|
PrometheusBuilder::new()
|
||||||
.with_http_listener(addr)
|
.with_http_listener(addr)
|
||||||
.install()?;
|
.install()?;
|
||||||
|
tracing::info!("Starting prometheus endpoint on {addr}");
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(self)
|
Ok(self)
|
||||||
|
|
Loading…
Reference in a new issue