From f8383ff53f6e16f10f42357f6ba391742c5b6adc Mon Sep 17 00:00:00 2001 From: Paul Tagliamonte Date: Fri, 25 Apr 2025 11:31:05 -0400 Subject: [PATCH 1/4] Add in a debug stub. Going to add more over time as needed. --- modeling-cmds/src/websocket.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modeling-cmds/src/websocket.rs b/modeling-cmds/src/websocket.rs index e8f2ec4d..d1cd6bfb 100644 --- a/modeling-cmds/src/websocket.rs +++ b/modeling-cmds/src/websocket.rs @@ -97,6 +97,9 @@ pub enum WebSocketRequest { metrics: Box, }, + /// Return information about the connected instance + Debug {}, + /// Authentication header request. Headers { /// The authentication header. @@ -208,6 +211,12 @@ pub enum OkWebSocketResponseData { /// Pong response to a Ping message. Pong {}, + + /// Information about the connected instance + Debug { + /// Instance name. This may or may not mean something. + name: String, + }, } /// Successful Websocket response. From 212b4b5188f762276a1e5d5196aad1d5b6c9d4d9 Mon Sep 17 00:00:00 2001 From: Paul Tagliamonte Date: Fri, 25 Apr 2025 11:55:48 -0400 Subject: [PATCH 2/4] add api_call_id to engine params --- modeling-cmds/src/session.rs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/modeling-cmds/src/session.rs b/modeling-cmds/src/session.rs index 968fc63a..56559001 100644 --- a/modeling-cmds/src/session.rs +++ b/modeling-cmds/src/session.rs @@ -29,6 +29,8 @@ pub struct EngineParams { /// the session will be written out to this filename. /// For debugging. pub replay: Option, + /// API Call ID associated with this request + pub api_call_id: Option, } impl Default for EngineParams { @@ -43,17 +45,7 @@ impl Default for EngineParams { pool: None, show_grid: false, replay: None, - } - } -} - -impl EngineParams { - /// Returns a default EngineParams with the grid enabled. - /// This is primarily useful for engine testing. - pub fn default_with_grid() -> Self { - Self { - show_grid: true, - ..Self::default() + api_call_id: None, } } } From c023ad56872b2034a6e9f8140621a15005ad313f Mon Sep 17 00:00:00 2001 From: Paul Tagliamonte Date: Fri, 25 Apr 2025 11:57:32 -0400 Subject: [PATCH 3/4] Revert "add api_call_id to engine params" This reverts commit 212b4b5188f762276a1e5d5196aad1d5b6c9d4d9. --- modeling-cmds/src/session.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/modeling-cmds/src/session.rs b/modeling-cmds/src/session.rs index 56559001..968fc63a 100644 --- a/modeling-cmds/src/session.rs +++ b/modeling-cmds/src/session.rs @@ -29,8 +29,6 @@ pub struct EngineParams { /// the session will be written out to this filename. /// For debugging. pub replay: Option, - /// API Call ID associated with this request - pub api_call_id: Option, } impl Default for EngineParams { @@ -45,7 +43,17 @@ impl Default for EngineParams { pool: None, show_grid: false, replay: None, - api_call_id: None, + } + } +} + +impl EngineParams { + /// Returns a default EngineParams with the grid enabled. + /// This is primarily useful for engine testing. + pub fn default_with_grid() -> Self { + Self { + show_grid: true, + ..Self::default() } } } From d8c483f2c4e759a02d1be97b2c6b3d84ebfc16e1 Mon Sep 17 00:00:00 2001 From: Paul Tagliamonte Date: Fri, 25 Apr 2025 11:58:01 -0400 Subject: [PATCH 4/4] Add in the API Call ID as an optional param --- modeling-cmds/src/session.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modeling-cmds/src/session.rs b/modeling-cmds/src/session.rs index 968fc63a..167aa7b3 100644 --- a/modeling-cmds/src/session.rs +++ b/modeling-cmds/src/session.rs @@ -29,6 +29,8 @@ pub struct EngineParams { /// the session will be written out to this filename. /// For debugging. pub replay: Option, + /// API Call ID for distributed tracing + pub api_call_id: Option, } impl Default for EngineParams { @@ -43,6 +45,7 @@ impl Default for EngineParams { pool: None, show_grid: false, replay: None, + api_call_id: None, } } }