Logging
MemorySync ships every customer-facing log line through structured, PII-safe pipelines that show up in three places: the dashboard’s API Logs view, the immutable Audit Trail, and your own systems via outbound forwarding. Each layer is correlated by request ID and trace ID so you can follow any request end-to-end from your application all the way through the recall pipeline.
Logging Surfaces
There are three distinct logging surfaces, each tuned for a different purpose:
| Surface | Purpose |
|---|---|
| API Logs | Developer-facing per-request log for every API-key authenticated call. Searchable and filterable by endpoint, status, API key, trace ID, and error cluster. |
| Audit Trail | Compliance-grade record of every action taken on your tenant — by users, API keys, or the platform itself. Immutable until retention expires. |
| Outbound forwarders | Continuous push of API logs and audit events to your own log aggregator or SIEM via signed HTTPS deliveries. |
All three surfaces share the same request ID and trace ID so a single incident can be followed across them without any reconciliation work on your side.
API Logs
Every API-key authenticated request to a customer-facing endpoint produces an API log entry. The entry is searchable from the dashboard and forwardable to your stack:
- What is recorded. Organization, API key (prefix only), project, endpoint, method, status code, latency, sanitized request and response payloads, client IP, user agent, bytes in/out, trace ID, rate-limit result, and any error details.
- Error clustering. Failed requests (4xx / 5xx) are grouped by a stable error hash that combines endpoint, method, status, and normalized error message. The dashboard surfaces these clusters so identical failures collapse into one row.
- Sampling. Successful traffic is sampled deterministically by trace ID at a tenant-configurable rate. Failures, rate-limited responses, and any request that crossed a critical threshold are always kept regardless of sample rate.
- Non-blocking persistence. API log writes happen out-of-band of the response, so logging never adds to your user-visible latency.
Audit Trail
The audit trail is a tamper-evident, compliance-grade record of every action that touched your tenant. Unlike API Logs (which focus on developer debugging), the audit trail focuses on who did what, when, to which resource:
- Coverage. Every API call — including failed and rate-limited ones — plus every state change applied by the platform (background sweeps, DSR processing, retention purges, key rotations, configuration changes) is recorded.
- Immutability. Audit records are append-only. Customers cannot edit or delete them through the API; they age out only after the configured retention window has elapsed.
- Retention. 90 days by default, extendable on enterprise plans. The platform enforces retention automatically — there is no maintenance action required from your team.
- Categorisation. Each entry carries a category (
security,compliance,data,configuration, etc.) and a severity, so dashboards and outbound forwarders can route entries appropriately.
Request ID & Trace ID Correlation
Every request is assigned two correlation identifiers that are returned in response headers and recorded in every downstream log entry, audit record, and outbound webhook:
| ID | Response Header | Behavior |
|---|---|---|
| Request ID | X-Request-ID | Unique per request. If your call sends an X-Request-ID header, the platform honours it; otherwise a fresh ID is generated. |
| Trace ID | X-Trace-ID | Cross-system correlation. If you propagate a trace ID from your upstream service, the platform uses it; otherwise it falls back to the request ID. This is what links MemorySync logs to your own traces. |
When something goes wrong, pulling the X-Trace-ID from your application logs and searching the dashboard’s API Logs by that ID gives you the platform-side view of the same request in one step.
PII-Safe Logging
All log surfaces apply multi-layer sanitization before any payload is persisted or forwarded. Sensitive content cannot leak through logs even when an integration sends it accidentally:
| Protection | Behavior |
|---|---|
| Header redaction | Only a small allow-list of headers is preserved (content-type, accept, user-agent, x-request-id, x-trace-id, x-project-id). All sensitive headers (authorization, cookies, API keys, CSRF tokens) are replaced with [REDACTED]. |
| Field-level masking | Payloads are recursively scanned. Any field whose name matches sensitive patterns (password, token, secret, authorization, cookie, email, SSN, etc.) is masked with [REDACTED]. |
| Pattern scrubbing | String values are scrubbed for bearer tokens, JWT-shaped strings, API-key-shaped tokens, and email addresses — regardless of the field name they appear under. |
| Depth & size limits | Recursive sanitization caps at a fixed nesting depth, and oversized payloads are truncated with a _truncated: true marker so pathological inputs can’t bloat your logs. |
| Tenant-level kill switch | Each tenant can disable payload capture entirely from the dashboard. With payload capture off, API Logs still record metadata (status, latency, error class) but never store the request or response body. |
Outbound Forwarding (SIEM)
If your team operates a centralized log or SIEM platform, MemorySync forwards a real-time stream of API logs and audit events to your own HTTPS endpoint:
- Push, not pull. The platform pushes entries to your endpoint at a fixed cadence. You don’t scrape, you don’t install agents, you just register the endpoint and a secret.
- Signed deliveries. Every delivery is signed with an HMAC-SHA256 signature so your receiver can verify authenticity and reject spoofed traffic.
- Batched. Entries are delivered in small batches to keep the receiver load predictable. Per-batch and per-endpoint delivery health is visible in the dashboard.
- Retry and dead-letter. Failed deliveries are retried with exponential backoff. Persistent failures move the endpoint into a visible dead-letter state so you can fix the receiver without losing data.
X-Trace-ID in your downstream stack lets you join MemorySync logs to your application logs in one query.What You Control
There is no log infrastructure to manage. The handful of customer-facing controls are all on the dashboard under Settings → Logging:
- API Log retention. How long developer-facing API log entries are kept before they age out.
- Audit retention. Compliance-grade retention window for audit entries (default 90 days, extendable on enterprise plans).
- Payload capture. Toggle that controls whether request and response bodies are stored alongside metadata in API Logs.
- API log sample rate. Down-sample successful 2xx traffic to control volume in very high-throughput tenants. Failures and rate-limited responses are always kept.
- Outbound forwarders. One or more HTTPS endpoints to receive log and audit deliveries, with signature secret and category filter per endpoint.