TL;DR: AI gateways can emit OpenTelemetry traces for every LLM request and export them asynchronously to Arize without adding latency, according to TruFoundry. The architectural takeaway is that observability, routing, and data leakage controls now sit in the same control plane for AI systems, which makes gateway governance part of identity and access governance for models, tools, and agent workflows, while preserving privacy controls that can strip prompt and completion content before anything leaves the gateway.
At a glance
What this is: TruFoundry describes an AI gateway tracing pattern where every LLM request becomes an OpenTelemetry span tree that can be exported externally without adding latency.
Why it matters: This matters because gateway-level tracing, routing, and content filtering now influence both model observability and the governance of sensitive prompt data in one control plane.
By the numbers:
- A single gateway pod on 1 vCPU and 1 GB RAM handles 250+ requests per second with approximately 3 ms of added latency.
- TrueFoundry says the gateway handles 350+ RPS on just 1 vCPU in its production-ready platform description.
Context
AI gateway observability is the practice of turning model requests into structured telemetry so teams can inspect routing, latency, token usage, and policy decisions. In this case, the governance gap is not visibility alone but whether sensitive prompt content can be observed without being exported beyond the organisation's boundary. The identity angle is real because the gateway validates JWTs, resolves authorisation, and mediates access to model endpoints and tool flows.
For practitioners, the important shift is that the gateway becomes the enforcement point for both telemetry and privacy. If prompt and completion content can be removed before export, teams can keep performance data and operational traces while reducing the chance that content leaves controlled infrastructure. That is a more practical model than treating observability as separate from data handling.
Key questions
Q: How should teams stop prompt content from leaving an AI gateway through telemetry export?
A: Treat the gateway as the privacy boundary. Export only structural trace data such as latency, model metadata, and token counts, and suppress prompt and completion fields before any external receiver can ingest them. That lets teams keep observability while reducing the chance that regulated or sensitive content reaches third-party systems.
Q: Why do AI gateways change the authorisation model for LLM traffic?
A: Because the gateway is now where identity, model selection, and tool access are resolved together. If JWT validation and access checks happen in the same layer that routes requests and emits traces, then governance must cover both who can call a model and what telemetry that call produces.
Q: What are the signs that LLM observability is not working well enough?
A: Common warning signs include unexplained latency, inconsistent outputs, missing traces, weak session context, and no clear link between prompts and downstream actions. If teams cannot audit user interactions or correlate failures across chains and tools, observability is too shallow. Another signal is reactive debugging, where engineers learn about issues only after production impact is visible.
Q: When is it better to keep LLM content inside the gateway instead of exporting it?
A: Keep content inside the gateway whenever the prompt, completion, or tool payload may contain personal data, confidential business data, or regulated material. Export the minimum telemetry needed for troubleshooting and evaluation, and retain the richer content only in systems that are explicitly approved to store it.
Technical breakdown
OpenTelemetry span trees for LLM requests
OpenTelemetry represents a request as a trace made up of spans, where each span captures one unit of work such as authentication, routing, provider calls, or a tool invocation. For LLM workloads, plain distributed tracing is not enough because prompts, completions, token counts, and finish reasons need their own semantic meaning. That is why AI observability platforms layer LLM-specific attributes and span kinds on top of OTLP. The result is a trace that can show both infrastructure timing and model behaviour in one execution path, which is especially important when a gateway mediates access to multiple providers and tools.
Practical implication: Model observability should be designed as structured telemetry from the start, not as free-text logging after the fact.
Asynchronous export keeps telemetry out of the request path
The gateway pattern described here separates request processing from trace export. Authentication, model resolution, and provider routing happen in memory, while trace emission is queued and exported asynchronously over standard OTEL protocols. That architecture matters because observability can otherwise become a hidden source of latency, reliability risk, and cost. By decoupling export from the live inference path, the gateway can continue serving requests even if the external backend is slow or unreachable. The trade-off is that operators must trust the internal queueing and exporter pipeline to preserve trace integrity without introducing blind spots.
Practical implication: Keep inference latency separate from observability delivery by using asynchronous export and internal buffering.
Gateway-level content filtering changes the privacy boundary
The privacy control in this pattern is not redaction after export, but attribute suppression before the trace leaves the gateway. When prompt and completion content are dropped at the gateway, the external backend still receives structural data such as latency, token counts, model metadata, and error status, but not the user content itself. That is a material governance distinction because it preserves operational observability while narrowing the data sharing boundary. For regulated environments, the key question is whether the telemetry schema is designed to carry only what the external system truly needs.
Practical implication: Define a telemetry allowlist and block prompt content at the gateway before any external export occurs.
Threat narrative
Attacker objective: The likely objective is to obtain sensitive prompt content, completion content, or model usage data from exported telemetry rather than from the model itself.
- Entry occurs when a user or application sends an LLM request through the gateway and the gateway validates the JWT, resolves access, and routes the prompt to a model provider.
- Credential and content exposure risk arises if prompt or completion attributes are exported without filtering, because the same trace that records model behaviour can also carry sensitive input and output data.
- Impact is unnecessary disclosure of prompts, completions, or model usage metadata to external observability systems, even when the inference path itself remains fast and reliable.
Breaches seen in the wild
- LiteLLM MCP auth bypass 2026: An exploited LiteLLM MCP auth bypass and default sk-1234 master keys let attackers steal AI gateway master and provider API keys.
- Moltbook AI agent keys breach: Moltbook breach exposed 1.5M AI agent keys.
Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
AI observability is becoming a governance boundary, not just a monitoring feature. When traces can include prompts, completions, routing decisions, and token counts, the telemetry pipeline itself becomes part of the security model. The practical implication is that teams should treat observability export as a controlled data flow, not an engineering afterthought.
Gateway-mediated tracing creates a new control point for identity and authorisation. The article shows JWT validation and authorisation resolution happening alongside model routing, which means the gateway is now governing who can reach which model path. That is especially relevant for agentic AI workflows, where tool access and model access often intersect. Practitioners should align traceability with access governance rather than managing them as separate programmes.
Prompt-content suppression is a more realistic control than trying to perfect downstream retention policy. Once content reaches an external observability backend, the privacy problem is already larger and harder to contain. The stronger model is to decide what never leaves the gateway in the first place. Teams operating in regulated or sensitive environments should design for structural telemetry outside and content containment inside.
Trace export and inference routing are converging into the same operational plane. That convergence matters because AI teams are now making decisions about performance, trust boundaries, and data exposure in one place. The named concept here is gateway telemetry boundary: the point where model observability ends and external data sharing begins. Practitioners should define that boundary explicitly and govern it as part of AI access control.
LLM observability will increasingly depend on policy-aware instrumentation. Basic tracing is no longer enough when the same request path carries sensitive content, routing logic, and usage metadata. This pushes programmes toward policy-based telemetry design, where the export schema is constrained by data sensitivity rather than by convenience. The implication for practitioners is clear: build observability around minimisation, not exhaustiveness.
From our research library:
- AI-related credential leaks surged 81.5% year-over-year in 2025, with the surrounding AI infrastructure leaking 5x faster than core LLM providers, according to the State of Secrets Sprawl 2026.
- Read next: LLM Provider API Key Security and LLMjacking Guide
What this signals
Gateway telemetry boundary: the export point for AI traces is now a governance control, because that is where observability either preserves or leaks prompt content. Teams should classify exported attributes by sensitivity and treat the trace schema as part of the AI data policy, not just a monitoring format.
Policy-aware telemetry is becoming the safer default for LLM programmes because observability value now comes from structural data, not raw content. Where content does not need to cross the boundary, suppress it at source and keep the external backend on a strict metadata diet.
AI-related credential leaks surged 81.5% year-over-year in 2025, with the surrounding AI infrastructure leaking 5x faster than core LLM providers, according to the State of Secrets Sprawl 2026. That reinforces the need to design gateway controls so sensitive content and adjacent secrets do not share the same export path.
For practitioners
- Define a telemetry allowlist for LLM traces Only export the span attributes needed for performance, reliability, and cost analysis. Keep prompt content, completion content, and other sensitive fields inside the gateway unless a documented use case requires them to leave.
- Separate access control from observability export Review whether JWT validation, model authorisation, and trace export are governed by different policies or by a single shared boundary. Where they are separate, document which system can see identity context and which can only see telemetry.
- Use asynchronous export with internal buffering Ensure trace delivery cannot block inference traffic. Validate that the exporter can fail open for observability while the gateway preserves request handling, and confirm the queue cannot leak raw request bodies.
- Filter prompt and completion attributes at the gateway Drop tfy.input, tfy.output, and tfy.input_short_hand, or equivalent prompt fields, before any gRPC export. Verify that structural data such as latency, token counts, and model metadata still reaches the observability backend.
- Test the trace boundary with real sensitive inputs Send controlled requests containing realistic prompt content, then inspect the destination backend to confirm that only the intended metadata arrives. Repeat the test after any exporter, routing, or schema change.
Key takeaways
- AI gateway tracing can provide detailed LLM observability without forcing prompt content to leave the gateway, which makes export policy part of the security design.
- The key architectural choice is not whether to collect traces, but whether trace export is content-aware and decoupled from the inference path.
- For identity and AI governance teams, the practical boundary is the gateway itself, where authorisation, telemetry, and privacy controls must be enforced together.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 and OWASP API Security Top 10 address the attack and risk surface, while NIST CSF 2.0, NIST SP 800-53 Rev 5 and CSA Cloud Controls Matrix set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-02 — Secret Leakage | Prompt and completion data can leak through exported traces just as secrets do through logs. |
| NHI-04 — Insecure Authentication | The gateway validates JWTs before routing, making authentication central to trace-governed access. | |
| NHI-10 — Human Use of NHI | Human users can trigger machine-mediated model flows that should not expose more data than necessary. | |
| Recommendation — Suppress sensitive trace fields before export and limit external visibility to approved metadata. Enforce strong token validation and tie model access to authenticated identity at the gateway boundary. Constrain what humans can cause the gateway to export and audit content-bearing trace paths. | ||
| NIST CSF 2.0 | PR.AA-05 — Access Permissions, Entitlements and Authorizations | The gateway resolves authorisation and model access in the request path. |
| Recommendation — Map model routing and trace export permissions to PR.AA-05 and review them as one governed control surface. | ||
| NIST SP 800-53 Rev 5 | IA-9 — Identification and Authentication (Non-Organizational Users) | External callers authenticate through JWTs before LLM access is granted. |
| Recommendation — Use IA-9 to validate non-organisational identities before they can reach model endpoints or telemetry flows. | ||
| OWASP API Security Top 10 | API2 — Broken Authentication | API-style gateway access depends on correct token validation before request routing. |
| Recommendation — Harden gateway authentication checks and reject any model access path that bypasses token validation. | ||
| CSA Cloud Controls Matrix | IAM — Identity and Access Management | The gateway unifies identity checks, routing, and telemetry for AI requests in one cloud control plane. |
| Recommendation — Apply IAM controls to the gateway so access decisions and trace exposure are governed consistently. | ||
Key terms
- OpenTelemetry-Compatible Trace: A request trace structured to align with OpenTelemetry conventions, so spans and attributes can be interpreted consistently across tools. In practice, it records the path and timing of a request through multiple components, helping teams understand execution flow, latency, and where errors or bottlenecks emerge.
- Span Attribute: A span attribute is a structured field attached to an individual telemetry span. For AI agents, attributes can include model name, token counts, tool inputs, tool outputs, and evaluation scores. They turn raw traces into searchable evidence that supports correlation, governance, and quality analysis.
- Telemetry Boundary: A telemetry boundary is the point where operational logs stop being internal data and become governed data subject to new access, retention, and privacy rules. In migration projects, that boundary often shifts from the SIEM itself to the collection and routing layer before ingestion.
- Policy-aware Instrumentation: Instrumentation that collects and exports only the data fields allowed by policy, rather than everything an application can technically observe. In LLM environments, this is the difference between useful tracing and avoidable data exposure.
Deepen your knowledge
The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, workload identity, and secrets management for practitioners who need to secure AI platforms and adjacent identity flows. It gives security teams a shared language for governing access, telemetry, and machine-to-machine trust in modern environments.
Published by the NHIMG editorial team on August 20, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org