Skip to content

Await local MCP telemetry sends#887

Merged
codyde merged 2 commits into
masterfrom
cody/await-local-mcp-telemetry
May 8, 2026
Merged

Await local MCP telemetry sends#887
codyde merged 2 commits into
masterfrom
cody/await-local-mcp-telemetry

Conversation

@codyde
Copy link
Copy Markdown
Collaborator

@codyde codyde commented May 8, 2026

Summary

  • Await local MCP tool telemetry instead of spawning and forgetting the send task.
  • Prevent short-lived stdio MCP sessions from exiting before the telemetry request can complete.

Testing

  • nix shell nixpkgs#cargo nixpkgs#rustc nixpkgs#rustfmt -c cargo fmt --check
  • nix shell nixpkgs#cargo nixpkgs#rustc -c cargo check
  • nix shell nixpkgs#cargo nixpkgs#rustc -c cargo test telemetry::tests::

@codyde codyde added the release/patch Author patch release label May 8, 2026
The dispatch macro emits one `command=mcp, sub_command=NULL` row at process
exit for every `railway mcp` server invocation. Capture the JSON-RPC
clientInfo on first tool call into a process-scoped OnceLock and consult it
in TelemetryContext::current_with_caller before falling back to env /
process-tree detection, so that exit row attributes to the actual MCP
client instead of NULL.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codyde codyde merged commit e3a90aa into master May 8, 2026
6 checks passed
@codyde codyde deleted the cody/await-local-mcp-telemetry branch May 8, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/patch Author patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant