Skip to content

Integration Observability and Security


Epic: Observability Pipeline

Plan: Implement full observability across the gateway with distributed tracing, structured logging, metrics, and alerting. Every request is traceable from ingestion to vendor response.

Architectural Context: OpenTelemetry tracing captures the full request lifecycle with consumer identity as a span attribute. Structured JSON logging is indexed by trace_id, request_id, consumer_id, and resource. Metrics cover calls.total, calls.errors, latency.p95, quota.remaining, and circuit.state. Webhook-specific metrics track inbound.received, outbound.delivered, and inbound.rejected.

Tasks

  • Implement OpenTelemetry tracing with consumer identity as span attribute
  • Build structured JSON logging indexed by trace_id, request_id, consumer_id, resource
  • Implement metrics: calls.total, calls.errors, latency.p95, quota.remaining, circuit.state
  • Build webhook metrics (inbound.received, outbound.delivered, inbound.rejected)
  • Implement alerts for error rate, latency SLO, circuit breaker, quota low, webhook rejection

Epic: Security Hardening

Plan: Harden the gateway against data leakage, replay attacks, and malformed input. PII is scrubbed from logs, all access is audited, and TLS 1.2 is enforced.

Architectural Context: PII field-level scrubbing ensures no sensitive data appears in logs. An audit log records every PII access for compliance. TLS 1.2 is the minimum with certificate verification. Webhook replay protection uses a 5-minute timestamp window. Input validation rejects unknown fields and oversized payloads at the gateway layer.

Tasks

  • Implement PII field-level scrubbing in logs
  • Build audit log of every PII access
  • Enforce TLS 1.2 minimum with certificate verification
  • Implement webhook replay protection via timestamp window (5 minutes)
  • Build input validation against JSON Schema (reject unknown fields, oversized payloads)

Marchay Platform Documentation