chore(gateway): log on startup (#9684)

As with some of our other applications, it is useful to know when they
restart and which version is running. Adding a log on INFO on startup
solves this.
This commit is contained in:
Thomas Eizinger
2025-06-26 14:59:09 +01:00
committed by GitHub
parent fbf48a207a
commit 6fc2ebe576

View File

@@ -95,6 +95,14 @@ async fn try_main(cli: Cli, telemetry: &mut Telemetry) -> Result<()> {
firezone_logging::setup_global_subscriber(layer::Identity::default())
.context("Failed to set up logging")?;
tracing::info!(
arch = std::env::consts::ARCH,
os = std::env::consts::OS,
version = env!("CARGO_PKG_VERSION"),
system_uptime = firezone_bin_shared::uptime::get().map(tracing::field::debug),
"`gateway` started logging"
);
tracing::debug!(?cli);
let firezone_id = get_firezone_id(cli.firezone_id.clone()).await
@@ -104,7 +112,7 @@ async fn try_main(cli: Cli, telemetry: &mut Telemetry) -> Result<()> {
telemetry
.start(
cli.api_url.as_str(),
concat!("gateway@", env!("CARGO_PKG_VERSION")),
RELEASE,
firezone_telemetry::GATEWAY_DSN,
firezone_id.clone(),
)