Skip to content

✨ log one structured line per MCP tool call - #53

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
telemetry/log-tool-calls
Nov 18, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
mainfrom
telemetry/log-tool-calls

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Tool calls over MCP were the one request path with no log line: a failing or slow say or meeting.join left nothing on stderr unless it escaped as an unhandled error. This logs one structured line per call (tool, ok, error_code on failure, duration_ms) through the existing logger.

Why this shape:

  • Logging only. No exporter, endpoint or new dependency, since no observability backend is configured.
  • The tool name comes from the client, so names outside the contract list are logged as unknown. The value set stays bounded.
  • Arguments, results and error messages are never logged, so no transcript text or secrets reach the log.
  • createMcpServer takes the logger as an optional second argument defaulting to the silent logger, so existing callers keep working.

Tested with test/mcp-log.test.ts (success, failure, unknown tool). Lint, typecheck, coverage, all green locally.

Filed from the telemetry audit of this repo, which had no prior coverage. Other observations, not acted on because no backend is confirmed: there is no /metrics endpoint, and several upstream-call catch {} blocks (discord/tts.ts, discord/transcribe.ts, vexa/client.ts) drop the underlying cause.

🤖 Generated with Claude Code

-- hive: agent=telemetry backend=claude model=claude-sonnet-5-5 claude=2.1.327

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: telemetry <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 18, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 16c0833 into main Nov 18, 2026
7 of 8 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the telemetry/log-tool-calls branch November 18, 2026 23:43
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

Evidence bundle `#531cffbbf` sha256:d3afd65f627fbc2e19bc6c8559934be790dc9364533559c64499780283fd8d3e — download from the dashboard or `hivectl review evidence #53`.

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off dco-signoff: yes size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants