From b19fdb12b41fe98bd99f85701ebb47d6cc6c41f2 Mon Sep 17 00:00:00 2001 From: Sebastian Tia Date: Tue, 23 Jan 2024 12:05:21 -0500 Subject: [PATCH] OPA-953 --- src/app.rs | 3 ++- src/internal_events/api.rs | 6 +++++- src/topology/controller.rs | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/app.rs b/src/app.rs index c5c9b3b4d9c95..8cb968145b1d6 100644 --- a/src/app.rs +++ b/src/app.rs @@ -142,7 +142,8 @@ impl ApplicationConfig { Ok(api_server) => { emit!(ApiStarted { addr: self.api.address.unwrap(), - playground: self.api.playground + playground: self.api.playground, + graphql: self.api.graphql }); Some(api_server) diff --git a/src/internal_events/api.rs b/src/internal_events/api.rs index e0f58608d8ad8..0066095d9bff6 100644 --- a/src/internal_events/api.rs +++ b/src/internal_events/api.rs @@ -7,15 +7,19 @@ use vector_lib::internal_event::InternalEvent; pub struct ApiStarted { pub addr: SocketAddr, pub playground: bool, + pub graphql: bool, } impl InternalEvent for ApiStarted { fn emit(self) { let playground = &*format!("http://{}:{}/playground", self.addr.ip(), self.addr.port()); + let graphql = &*format!("http://{}:{}/graphql", self.addr.ip(), self.addr.port()); info!( message="API server running.", address = ?self.addr, - playground = %if self.playground { playground } else { "off" } + playground = %if self.playground { playground } else { "off" }, + graphql = %if self.graphql { graphql } else { "off" } + ); counter!("api_started_total", 1); } diff --git a/src/topology/controller.rs b/src/topology/controller.rs index c34ef000aa591..bc8f87c7de331 100644 --- a/src/topology/controller.rs +++ b/src/topology/controller.rs @@ -121,7 +121,8 @@ impl TopologyController { Ok(api_server) => { emit!(ApiStarted { addr: new_config.api.address.unwrap(), - playground: new_config.api.playground + playground: new_config.api.playground, + graphql: new_config.api.graphql, }); Some(api_server)