agent_id; cryptographic identity fields are available only when the runtime is attested.
Install OpenTelemetry Support
google extra as well when you export to Google Cloud Trace, Monitoring, or Logging.
Instrument Dome
instrument_dome() attaches a logging handler, a tracer, and a meter to an existing Dome instance. Every argument is optional, so you can enable only the signals you need:
instrument_dome() again on the same instance is a no-op.
Set up your tracer and meter providers, including exporters for Jaeger, Prometheus, or another OpenTelemetry backend, before you call
instrument_dome().LLM Tracing Platforms
Dome exposesapply_decorator(), which wraps its scan methods with any decorator. Use it to add Dome activity to platforms that trace through decorators.
Weights & Biases Weave
Weave is W&B’s toolkit for tracing LLM applications:guard_input(), guard_output(), and their asynchronous forms then appear in your Weave dashboard with per-Guard and per-Detector details.
AgentOps
AgentOps provides Agent-focused observability. Installagentops separately, then apply its recorder:
Tracing
When you supply a tracer, Dome creates spans for each Guard and Detector it runs:- Guardrail execution: top-level span for
guard_input()andguard_output() - Guard execution: nested span for each Guard in the Guardrail
- Detector execution: nested span for each Detector in the Guard
dome-detection span per scan, carrying dome.guardrail, detection.label, detection.score, detection.method, dome.guard.enforced, and the agent.id, team.id, and user.id values you pass to the scan. The Vijil Console reads these spans and presents them in Monitor Dome Metrics.
Span Hierarchy
Metrics
When you supply a meter, Dome instruments every Guardrail, Guard, and Detector with four instruments:Metric Naming
Names follow the pattern[guardrail].[guard].[detector] plus the instrument suffix. instrument_dome() names the two Guardrails dome-input and dome-output, and characters that OpenTelemetry does not accept in an instrument name become underscores:
dome_input-requests_totaldome_input.security_default-flagged_totaldome_input.security_default.MBertPromptInjectionModel-latency_seconds
Logging
Dome logs through Python loggers namedvijil.dome. Any handler you pass to instrument_dome() is attached to those loggers.
Set
VIJIL_LOG_PAYLOADS=1 to add a redacted payload record, which reports the payload type and length rather than its content, at DEBUG level for every scan.
Best Practices
- Always instrument in production: visibility is essential for security.
- Set appropriate log levels: use
INFOin production andDEBUGfor troubleshooting. - Monitor block rates: sudden increases may indicate an attack.
- Track latency: confirm that Guards do not degrade the user experience.
- Alert on errors: a rise in
-error_totalmeans Detectors are failing, and theon-errorpolicy is deciding outcomes instead of the Detectors.
Work in Progress
The programmatic observability capabilities and integrations are currently in private preview and subject to change.
Next Steps
Trust Runtime
Capture identity and policy decisions
Configure Guardrails
Guard configuration options
Use Guardrails
Runtime integration patterns
Custom Detectors
Build custom detection methods