Skip to content

[TOW-1424] Add runner-id to telemetry - #192

Merged
sammuti merged 1 commit into
developfrom
chore/TOW-1424-telemetry-runner-id
Feb 4, 2026
Merged

[TOW-1424] Add runner-id to telemetry#192
sammuti merged 1 commit into
developfrom
chore/TOW-1424-telemetry-runner-id

Conversation

@sammuti

Copy link
Copy Markdown
Contributor

Add runner-id to telemetry as a mandatory part of telemetry context to understand issues

@sammuti
sammuti requested review from bradhe and CopilotFebruary 3, 2026 19:38

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a mandatory runner_id field to the telemetry context to help identify and diagnose issues by tracking which runner instance is executing a run.

Changes:

  • Modified the telemetry Context struct to require a runner_id parameter
  • Updated the logging macro to include runner_id in all telemetry events
  • Refactored the Context API with a builder pattern (new()with_runid())

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
crates/tower-telemetry/src/context.rsAdded mandatory runner_id field and refactored API to use builder pattern
crates/tower-telemetry/src/logging.rsUpdated logging macro to emit runner_id in all telemetry events
crates/tower-cmd/src/run.rsUpdated CLI to use new Context API with "local-runner" identifier
crates/tower-runtime/tests/subprocess_test.rsUpdated test to provide required runner_id parameter
crates/tower-runtime/tests/local_test.rsUpdated all test cases to provide required runner_id parameter

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

ExecutionSpec {
id,
telemetry_ctx: tower_telemetry::Context::new(),
telemetry_ctx: tower_telemetry::Context::new("runner-id".to_string()),

CopilotAIFeb 3, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded test value 'runner-id' is ambiguous. Consider using a more descriptive identifier like 'test-subprocess-runner' to clearly indicate this is a test context.

Suggested change
telemetry_ctx: tower_telemetry::Context::new("runner-id".to_string()),
telemetry_ctx: tower_telemetry::Context::new("test-subprocess-runner".to_string()),

Copilot uses AI. Check for mistakes.
// We need to create the package, which will load the app
let opts = StartOptions {
ctx: tower_telemetry::Context::new(),
ctx: tower_telemetry::Context::new("runner-id".to_string()),

CopilotAIFeb 3, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded test value 'runner-id' is ambiguous and repeated across multiple tests. Consider using a more descriptive identifier like 'test-local-runner' or defining a test constant to maintain consistency.

Copilot uses AI. Check for mistakes.

@bradhebradhe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sammuti
sammuti merged commit 5e47ff6 into developFeb 4, 2026
5 checks passed
@sammuti
sammuti deleted the chore/TOW-1424-telemetry-runner-id branch February 4, 2026 10:24
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@sammuti@bradhe