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

SurfaceTrace policy scope
SDK in-memory trace on RunResultYes (export JSON)
GET /v1/runs/{id}/traceYes
Relay GET.../runs/{id}/traceYes (browser reachable)
Postgres arcflow_trace_eventsYes (migration 000005)
VS Code timeline from exportYes
OTel span attributes (OpenTelemetry export (alpha))Yes when enabled
Application logsPolicy: 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:

EventPolicy-compliant fieldsForbidden
ProviderRequestSentprompt_size_bytes, model_idPrompt text
ToolCallStartedinput_schema_hashTool arguments
MemoryRetrievedchunk_count, total_bytesChunk bodies
StreamChunkReceivedchunk_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:

sql
SELECT run_id, kind, payload
FROM arcflow_trace_events
WHERE run_id = 'your-run-uuid'
ORDER BY sequence
LIMIT 20;

Replace payload with actual column names from migration SQL in server/arcflow-server/migrations/.

Compliance audit procedure

  1. Sample export: GET /v1/runs/{id}/trace for a RAG and tool-heavy run.
  2. Secret grep: Search JSON for @, sk-, Bearer , large base64 blobs.
  3. Field review: Compare each event kind to Trace events normative Trace policy column.
  4. Browser path: Repeat via Relay trace URL with site token.
  5. Logs: Confirm application logs do not duplicate traces with prompt text.
  6. OTel (if enabled): Inspect Jaeger/Tempo for forbidden attribute keys.

Audit SQL (pattern)

sql
-- Events for a run (adjust table/column names to your migration)
SELECT kind, payload::text
FROM arcflow_trace_events
WHERE run_id = $1;

Manual review: no substring matches for user-provided essay content, API keys, or email addresses in trace payloads.

Developer and operator responsibilities

RoleResponsibility
Workflow authorAvoid PII in agent_name, tool_name
PlatformKeep ARCFLOW_DEBUG=false in production
OperatorDo not log ingest body to analytics
IntegratorDo 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_token or admin key
  • Dependency scanning in CI

Before approving new observability features

  1. Does any new field embed user or model text?
  2. Does any field embed tool arguments or retrieval chunks?
  3. Can this event reach the browser via Relay trace poll?
  4. Do logs duplicate trace with richer content?

If any answer is yes, reject or gate behind localhost debug.