From 7dbe3574654fcfee8606b2ade4c484dd245cae00 Mon Sep 17 00:00:00 2001 From: shin-core <153108882+shin-core@users.noreply.github.com> Date: Fri, 17 Jul 2026 05:13:53 +1000 Subject: [PATCH] docs(mcp): fix stale 'NOT WIRED YET' comment in telemetry.ts (#6617) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The header said recordMcpToolCall is deliberately not called from the tool-dispatch path, but #6237 (merged PR #6358) wired it in via recordMcpToolTelemetry in src/mcp/server.ts — the single chokepoint every tools/call routes through. Comment-only correction; no runtime change. Closes #6617 --- src/mcp/telemetry.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mcp/telemetry.ts b/src/mcp/telemetry.ts index 44b9d5347a..33cf1eafd4 100644 --- a/src/mcp/telemetry.ts +++ b/src/mcp/telemetry.ts @@ -11,8 +11,10 @@ import { PostHog } from "posthog-node"; // The wrapper also never throws: a PostHog init/capture failure degrades to recording nothing, exactly like // the unconfigured path, so it can never surface an error into the MCP tool caller. // -// NOT WIRED YET: per #6235 this module is deliberately NOT called from the tool-dispatch path — that (and the -// client lifecycle/flush strategy a live Worker needs) is the separate instrumentation issue's job. +// WIRED into the remote tool-dispatch path (#6237, merged PR #6358): {@link recordMcpToolCall} is invoked from +// `recordMcpToolTelemetry` in src/mcp/server.ts — the single chokepoint every `tools/call` request that reaches +// handleMcpRequest routes through exactly once, whether it succeeds or throws. (The local/CLI-side counterpart, +// packages/loopover-mcp/lib/telemetry.js, has its own separate wiring status per #6236/#6238.) /** PostHog US-cloud ingestion host — the default when POSTHOG_HOST isn't set. */ const DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com";