Skip to content

feat(observability): write MCP task metrics#97

Open
canoo wants to merge 2 commits into
mainfrom
feat/observability-route-metadata
Open

feat(observability): write MCP task metrics#97
canoo wants to merge 2 commits into
mainfrom
feat/observability-route-metadata

Conversation

@canoo

@canoo canoo commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add richer MCP task-log metadata: task_type, model_provider, route_band, cost_usd, byte counts, input hash, and RFC3339 timestamp.
  • Add a SQLite writer for new MCP task rows at ~/.config/nexus/logs/observability.sqlite when the Node runtime supports node:sqlite.
  • Keep JSONL writes for compatibility with older runtimes and the current TUI fallback path.
  • Update the TUI Task Log summary to show route-band counts and cloud-equivalent/local-cost totals.
  • Extend task-log summary tests for route-band and cost math.
  • Mark the first observability-schema migration steps as done in docs.

Issue Links

Refs #9, #10, #11.

Validation

  • docker run --rm -v "${PWD}:/repo" -w /repo golang:1.26.2 gofmt -w tools/tui/main.go tools/tui/main_test.go
  • docker run --rm -v "${PWD}:/repo" -w /repo/tools/tui golang:1.26.2 go test ./...
  • node --check tools/mcp/server.mjs
  • git diff --check -- tools/mcp/server.mjs tools/tui/main.go tools/tui/main_test.go docs/observability-schema.md

Notes

This is the first v0.2.0 observability implementation slice. It writes SQLite when available and keeps JSONL during the migration. The next slice should make the TUI prefer SQLite and fall back to JSONL.

@canoo canoo self-assigned this Jun 28, 2026
@canoo
canoo marked this pull request as ready for review June 28, 2026 21:57
@canoo canoo added enhancement New feature or request tui TUI related mcp MCP server related labels Jun 28, 2026 — with ChatGPT Codex Connector
@canoo canoo changed the title feat(observability): log route metadata feat(observability): write MCP task metrics Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request mcp MCP server related tui TUI related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant