Skip to content

feat(gateway): structured logging, tracing, and error taxonomy across gateway + SDKs #35

Description

@aguilar1x

Context

Failures in the gateway or SDK today surface as opaque errors with no correlation between a client-side failure and the corresponding gateway request. There's no way to trace a checkout end-to-end or classify failures by cause.

Scope

  • Structured JSON logging in connect-gateway with request IDs propagated from connect-core's REST client through to gateway responses.
  • A shared error taxonomy (e.g. PACTO_AUTH, PACTO_RATE_LIMIT, PACTO_UPSTREAM, PACTO_VALIDATION) surfaced consistently in SDK error objects.
  • Basic tracing spans around the handshake → quote → escrow → webhook lifecycle, exportable to OpenTelemetry.

Acceptance criteria

  • A failed checkout can be traced from connect-react error to the specific gateway log line via a shared request ID.
  • SDK consumers can branch on error .code, not on parsing message strings.
  • Tracing spans are emitted for at least the handshake and escrow-creation paths.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26area:gatewayConnect Gateway (BFF)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions