1. The observe only guardrail in one preset
The Compliance Logger (observe-only) lives in the Compliance category of the guardrail template picker. It is a singlepii rule with
action flag — the action that records a match and leaves the traffic
alone. There is no block, no mask, no model call, and no SDK change: the
policy lives in the gateway, and your app keeps calling
/v1/chat/completions exactly as before.
Flag, never enforce
Action is flag — it annotates a match and lets the request and
response through untouched. Nothing is blocked, nothing is masked.
Both stages
Stage both — the rule scans the request and the model’s
response, so you see PII on the way in and the way out.
Zero quota overhead
Built-in PII detection is deterministic string matching — no upstream
judge call, no extra tokens, nothing serialized behind a model.
Flag = observe-only. A
flag action records a match and does
not change traffic. It is the right tool for measuring a policy
before you enforce it, or for keeping a compliance log without altering
behavior. See Actions for the full
block / mask / flag trade-off.2. The Compliance Logger preset, exactly as shipped
Open the New guardrail split-button in the console Guardrails view and pick the Compliance template category. The Compliance Logger (observe-only) seed is a singlepii rule:
| Field | Value |
|---|---|
| Type | pii |
| Stage | both (request + response) |
| Action | flag (observe-only) |
| Entities | email, phone, ssn, credit_card, ip |
3. Apply the preset in the console
Every step here is a console action under your own session. Creating and editing guardrails requires Developer+ in the workspace. Only the final/v1/* call uses an sk-orca-... relay key.
Open the template
In the console, open Guardrails, click the New guardrail
split-button, and pick Compliance Logger (observe-only) from the
Compliance template category.
Name and save
Give the guardrail a name (≤ 64 chars), like
compliance-logger,
optionally trim or extend the entity list, and save. Leave the action
on flag — that is what keeps it observe-only.Test it
Open the Test tab, paste a sample at the
input stage, and run
the policy locally — no upstream call, no quota (see
§5).Attach a key
Edit an API key and pick
compliance-logger from the Guardrail
dropdown (sets guardrail_id on the key), or mark it the workspace
default. See Attach to a key
and Account default.4. One concrete example
A guardrail namedcompliance-logger (the preset, unchanged) is attached
to a key. Call the gateway exactly as before — no new headers, no SDK
change:
pii rule flags email and ssn, and each
match lands in the workspace Matches feed. The caller never sees a
difference; you get the audit trail.
5. Test before you attach
Prove the rule flags what you expect before any key points at it. Open the Test tab inside the editor, paste a sample, pick a stage, and run:6. See what fired
This is the whole point of an observe-only preset: the Matches feed. Every flagged occurrence records a match — rule type, action, stage, and a detail string — surfaced atGET /api/guardrail/match (Member). The
matched substring itself (the actual email, the SSN) is recorded only
when Log raw content is on, which is off by default.
For a compliance log, leaving Log raw content off is usually the
point: you learn that an SSN appeared and how often, without copying
regulated data back into your own telemetry. Turn it on per guardrail
only when you need the substring for triage; the setting is
non-retroactive. See Matches feed
and Logging & privacy.
pii rule. The matched entity (email, ssn, …) is carried in each match’s
detail string. That signal is what tells you whether you are ready to
flip the action from flag to block or mask.
Every edit to the guardrail writes a versioned history row in the same
transaction — diff any two versions and revert from the History view.
See Versioning.
7. From observe-only to enforcing
The Compliance Logger is designed to be the first stage of a rollout:Step 1 — observe
Step 1 — observe
Attach the flag-only preset and let the Matches feed fill with real
traffic. No request is ever blocked, so there is zero risk to
production while you measure.
Step 2 — tune
Step 2 — tune
Use the feed and tune false positives
to confirm the entity set matches your data and isn’t noisy.
Step 3 — enforce
Step 3 — enforce
Flip the action to mask (redact PII before the model) or
block, or swap in an enforcing preset. Use per-entity
entity_actions to mask some entities
while blocking the high-severity ones in a single rule.8. Where to go next
Actions: block / mask / flag
The full action model — when to observe, when to redact, when to
reject.
PII Shield
The enforcing counterpart — mask PII on the request instead of just
logging it.
Matches feed
Browse, group, filter, and export every flagged occurrence.
Logging & privacy
The Log-raw-content toggle and what is recorded by default.
