Overview
Every span captured by TraceCtrl carries two layers of attributes:
- OpenInference attributes — set by the framework instrumentor (LLM calls, tool names, I/O values)
- TraceCtrl security attributes — set by the
TraceCtrlSpanProcessor (agent identity, risk classification, session correlation)
TraceCtrl Security Attributes
These are the tracectrl.* attributes added to spans by the TraceCtrlSpanProcessor:
Guardrail Span Attributes
When Protector Plus or an in-SDK LLM-judge guardrail evaluates a message, a dedicated tracectrl.guardrail.evaluation span is emitted. A tracectrl.guardrail.registered span is emitted once per enabled guardrail at startup.
OpenInference Attributes
These are set by the underlying framework instrumentors:
Schema Constants
Import attribute names as constants to avoid typos:
The tracectrl.system_prompt_hash attribute enables prompt drift detection — if the hash changes between observations, the system prompt was modified. This is a key indicator for prompt injection attacks.