Files
Oleks cb369d3be3
ci/woodpecker/push/arm64 Pipeline failed
ci/woodpecker/push/amd64 Pipeline failed
metamcp: observability patch — W3C traceparent + Prometheus /metrics (cluster#49, cluster#50)
Adds a postPatch step that applies metamcp-observability.patch to
the upstream metatool-ai/metamcp v2.4.22 source before pnpm build.
The patch:

  * Drops in apps/backend/src/lib/observability/{trace,metrics}.ts:
    AsyncLocalStorage trace context + parser/synthesizer per the W3C
    contract (Specs/mcp-request-id), plus a hand-rolled
    Counter/Histogram so we don't have to touch pnpm-lock.yaml /
    pnpmDeps hash (no new npm dependency).

  * Wires a top-level express middleware in apps/backend/src/index.ts
    that binds trace context, observes mcp_hop_duration_seconds on
    response close, and counts mcp_cancellation_total when the
    downstream client hangs up mid-response.

  * Adds /metrics to the Express app and last-resort process traps
    (unhandledRejection / uncaughtException) feeding
    mcp_uncaught_throw_total — the smoking-gun signal from
    cluster#44.

  * Patches process-managed-transport.send() to inject
    params._meta.traceparent on every outbound JSON-RPC bound for a
    stdio child (MCP _meta convention, Specs/mcp-request-id).

Retire when this lands upstream.
2026-05-24 05:34:47 +03:00
..