Generic tracing often misses the fields AI teams need to operate safely and efficiently. It may record request timing, but not prompt and completion pairs, token consumption, model outputs, or per call cost. Without those signals, engineering teams struggle to debug behavior, compare runs, control spend, and support reliable evaluation of model driven features.
Why This Matters for Security Teams
Generic tracing was built to show request flow, latency, and service hops. ai observability needs far more context because model-driven systems are stateful, probabilistic, and expensive to operate at scale. Teams need to understand prompt and completion pairs, token usage, tool calls, safety filters, and per-request cost. Without those signals, it becomes difficult to debug misbehavior, compare model versions, or prove whether an issue came from the model, the prompt, or the surrounding orchestration.
This is also a governance problem, not just an engineering one. Security teams need auditability for sensitive prompts, redaction of secrets, and evidence that the right identities and controls were in place when a model acted. NIST guidance on identity and control mapping in NIST SP 800-63 Digital Identity Guidelines and NIST SP 800-53 Rev 5 Security and Privacy Controls reinforces that evidence quality matters as much as control design. NHIMG research on the Ultimate Guide to NHIs also shows why non-human workloads need explicit identity and telemetry boundaries rather than generic application logging. In practice, many security teams discover these gaps only after an outage, a runaway spend event, or an investigation that cannot reconstruct what the model actually saw and returned.
How It Works in Practice
production ai observability usually starts by treating the model interaction as a governed workload, not a normal web request. The tracing layer should capture prompt text, system instructions, retrieved context, model name, version, latency, token counts, tool invocations, and final completion. It should also retain correlation IDs so a single user request can be tied to downstream retrieval, agent actions, and external API calls. Where secrets or personal data may appear, the tracing pipeline needs redaction and field-level access controls before data reaches a shared observability platform.
That approach is aligned with current guidance from the observability and identity communities, but best practice is still evolving. The key difference from generic tracing is that AI telemetry must support evaluation and cost control, not just troubleshooting. Teams often add policy checks around:
- prompt and completion capture with sensitive field masking
- token and cost attribution per request, agent, or tenant
- tool-call tracing for retrieval, actions, and side effects
- model/version tagging so A/B tests and regressions are measurable
- immutable audit trails for high-risk workflows
Security teams should also connect traces to workload identity so they can prove which agent, service account, or execution context made each call. That is where AI observability becomes an NHI control surface, not just an engineering dashboard. The threat implications are not theoretical: NHIMG’s LLMjacking research shows how compromised NHIs can be abused to drive AI activity at attacker speed, which makes trace quality and identity linkage operationally important. These controls tend to break down in high-volume agentic systems because concurrent tool chains and rapid retries can overwhelm logs before analysts can reconstruct the causal path.
Common Variations and Edge Cases
Tighter AI tracing often increases storage, privacy risk, and operational overhead, so organisations have to balance visibility against retention limits and data minimisation. There is no universal standard for this yet, especially for agentic workflows where prompt chains, retrieval context, and tool output can become deeply nested. Some teams log only metadata by default and sample full content for approved incidents, while others keep full traces in restricted environments for regulated use cases.
The biggest edge cases appear when models handle secrets, regulated data, or autonomous tool use. In those environments, a generic tracing stack may be too blunt because it cannot selectively mask sensitive fields, enforce per-tenant access, or preserve the execution context needed for investigation. The DeepSeek breach illustrates why visibility into what was exposed, where it moved, and which identities touched it matters as much as model output itself. Best practice is evolving toward purpose-built AI observability with policy-aware logging, short retention windows for raw prompts, and structured events that can be joined to security telemetry. That guidance becomes fragile when trace volume is so high that teams silently disable fields, which leaves the most important evidence missing when an incident finally occurs.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Agentic AI Top 10, CSA MAESTRO and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | A03 | Agent telemetry must capture prompt, tool, and output data for safe runtime visibility. |
| CSA MAESTRO | TRI-2 | Observability is needed to trace agent actions and correlate them to workload identity. |
| NIST AI RMF | AI RMF emphasises measurement and monitoring of model behaviour and impacts. | |
| OWASP Non-Human Identity Top 10 | NHI-08 | AI observability must show which NHI executed a model or tool action. |
| NIST CSF 2.0 | DE.CM-1 | Continuous monitoring depends on telemetry that can actually reconstruct events. |
Collect security-relevant AI telemetry so anomalous model activity can be detected and investigated.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on August 28, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org