LogSpanGuardrailContent
Content type for safety and compliance check spans.Overview
LogSpanGuardrailContent captures guardrail evaluations such as content moderation, policy checks, or input validation. It is wrapped in a LogSpanContent union via the actual_instance pattern.
Fields
Must be
"Guardrail".The input payload as a JSON string. Must be valid, parseable JSON (the result of
json.dumps()).The output payload as a JSON string. Must be valid, parseable JSON (the result of
json.dumps()).Construction Pattern
All span content is wrapped in LogSpanContent using theactual_instance parameter: