Trace data policy compliance
The ArcFlow trace data policy is mandatory for production deployments. Traces and persisted trace events describe what happened (identifiers, timings, sizes, error codes) without exposing what was said (prompts, completions, tool payloads, retrieved chunk text). This page is the authoritative compliance reference for audit teams.
Product context: Trace data policy. Implementation guide: Trace data policy rules.
Normative contract: Trace events (normative).
The trace data policy
Traces and persisted trace events MUST NOT contain:
- Prompt or completion text
- Tool argument or result payloads
- Retrieved chunk text
- PII unless explicitly allowed by deployment policy
Allowed metadata includes: ids, names, roles, byte sizes, token counts, durations, error codes, schema hashes.
Where the trace data policy applies
| Surface | Trace policy scope |
|---|---|
SDK in-memory trace on RunResult | Yes (export JSON) |
GET /v1/runs/{id}/trace | Yes |
Relay GET.../runs/{id}/trace | Yes (browser reachable) |
Postgres arcflow_trace_events | Yes (migration 000005) |
| VS Code timeline from export | Yes |
| OTel span attributes (OpenTelemetry export (alpha)) | Yes when enabled |
| Application logs | Policy: do not duplicate traces with richer content |
Run result payloads on GET /v1/runs/{id} may include final output text under your product policy. The trace data policy governs trace events specifically, not every API field.
Runtime enforcement
Engine emission is implemented in runtime/arcflow-core/src/tracing/events.rs. Examples:
| Event | Policy-compliant fields | Forbidden |
|---|---|---|
ProviderRequestSent | prompt_size_bytes, model_id | Prompt text |
ToolCallStarted | input_schema_hash | Tool arguments |
MemoryRetrieved | chunk_count, total_bytes | Chunk bodies |
StreamChunkReceived | chunk_bytes (size) | Chunk text in storage |
Persisted rows in arcflow_trace_events store JSON event payloads only. No separate prompt/completion columns exist by design.
Postgres table structure (conceptual)
Migration 20240531000005 creates arcflow_trace_events with metadata JSON per event. Audit expects:
run_id,sequence,kind, serialized metadata fields- No columns for raw LLM I/O
Inspect with:
Replace payload with actual column names from migration SQL in server/arcflow-server/migrations/.
Compliance audit procedure
- Sample export:
GET /v1/runs/{id}/tracefor a RAG and tool-heavy run. - Secret grep: Search JSON for
@,sk-,Bearer, large base64 blobs. - Field review: Compare each event kind to Trace events normative Trace policy column.
- Browser path: Repeat via Relay trace URL with site token.
- Logs: Confirm application logs do not duplicate traces with prompt text.
- OTel (if enabled): Inspect Jaeger/Tempo for forbidden attribute keys.
Audit SQL (pattern)
Manual review: no substring matches for user-provided essay content, API keys, or email addresses in trace payloads.
Developer and operator responsibilities
| Role | Responsibility |
|---|---|
| Workflow author | Avoid PII in agent_name, tool_name |
| Platform | Keep ARCFLOW_DEBUG=false in production |
| Operator | Do not log ingest body to analytics |
| Integrator | Do not attach raw payloads to custom trace exporters |
Dashboard and BFF alignment
Private dashboard repo must pass trace data policy checks CI (exit criteria in Dashboard spec (ArcFlow repository)):
- No hardcoded API keys
- No logging of
site_tokenor admin key - Dependency scanning in CI
Before approving new observability features
- Does any new field embed user or model text?
- Does any field embed tool arguments or retrieval chunks?
- Can this event reach the browser via Relay trace poll?
- Do logs duplicate trace with richer content?
If any answer is yes, reject or gate behind localhost debug.
Related pages
- Trace events normative
- Webhook HMAC (external payloads separate from traces)
- Self-hosted security