Skip to content

feat(mcp): add request trace export using correlation IDs - #1155

Closed
jeffrey-graham wants to merge 1 commit into
mind-vault-1:mainfrom
jeffrey-graham:feat/issue-1068-correlation-trace-export
Closed

jeffrey-graham wants to merge 1 commit into
mind-vault-1:mainfrom
jeffrey-graham:feat/issue-1068-correlation-trace-export

Conversation

@jeffrey-graham

@jeffrey-graham jeffrey-graham commented Nov 10, 2026 •

Copy link
Copy Markdown

Summary

Adds correlation-ID request trace export (mcp/src/traceExport.ts, re-exported from mcp/src/auditQuery.ts) so operators can reconstruct a complete end-to-end tool execution timeline across audit JSONL logs and failure payloads.

  • Introduces exportTraceByCorrelationId, exportCorrelationTrace, and formatTraceReport with chronological sorting, total span duration calculation, secret redaction, and attachment of matching ToolErrorPayload / TroubleshootingHint records.
  • Adds 16 unit tests in mcp/src/traceExport.test.ts covering chronological reconstruction, failure attachment, secret scrubbing, and human-readable formatting.
  • Documents trace export usage in docs/mcp-correlation-ids.md and docs/mcp-audit-query.md.

Verification

  • pnpm --filter @mindvault/mcp exec vitest run src/traceExport.test.ts src/auditQuery.test.ts src/correlation.test.ts (63/63 passed)

Closes #1068

Sign up for free to 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.

[MCP] [Feature] Add request trace export using correlation IDs

1 participant