By NHI Mgmt Group Editorial TeamDomain: AI SecuritySource: TruFoundryPublished June 29, 2026

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: This is an architectural walkthrough of AI Gateway trace export, showing how request-level observability can be sent to Arize while keeping prompt content inside the gateway when privacy controls are enabled.

Why it matters: It matters because gateway-level tracing and content filtering sit at the intersection of AI governance, access control, and data handling, which is where identity teams increasingly inherit responsibility for model and agent traffic.

By the numbers:

👉 Read TruFoundry's guide to AI Gateway trace export and prompt redaction


Context

AI gateway observability is a governance problem as much as an engineering one. When LLM requests move through a shared gateway, the system that routes models, validates JWTs, and emits traces becomes part of the control surface for identity, authorization, and data exposure. TruFoundry's article is about how that control surface can export useful telemetry without forcing prompt content out of the environment.

The practical issue is that AI teams want request-level visibility while security and compliance teams need to keep sensitive inputs from leaving the boundary. That tension is especially important for AI agents and model traffic because the gateway may become the only place where access decisions, routing logic, and content filtering can be enforced consistently. For practitioners, this is typical of modern AI platform design rather than an edge case.


Key questions

Q: What breaks when AI gateway traces include prompt content by default?

A: Prompt content in exported traces can expose secrets, personal data, and proprietary instructions to downstream observability systems. That increases the blast radius of a monitoring integration and turns telemetry into a data leakage path. Security teams should classify trace payloads and disable content export whenever the destination is outside the trusted boundary.

Q: Why do AI gateways need both authorization and telemetry controls?

A: Authorization decides who can call a model or tool, while telemetry controls decide what information leaves the boundary after the call. If those controls are separated, teams can approve access correctly and still leak sensitive request data through traces. The two controls should be governed together because AI traffic often carries both access decisions and confidential content.

Q: How can security teams know whether AI trace export is working safely?

A: Check that traces contain the expected structural fields, such as model identifier, latency, token counts, and status, while sensitive request content is absent when exclusion is enabled. Then confirm the backend receives complete span trees without adding latency to inference. Safe operation means observability remains useful without broadening the data exposure boundary.

Q: Who is accountable when AI gateway telemetry leaks sensitive prompts?

A: Accountability sits with the team that owns the gateway policy, the telemetry configuration, and the data classification rules for exported traces. If the gateway forwards prompt content to a third-party backend without redaction, that is a governance failure, not just an observability bug. The owning team must define the boundary before deployment and verify it continuously.


Technical breakdown

How OpenTelemetry represents LLM request traces

OpenTelemetry provides the transport and structure for distributed traces, but LLM systems need richer semantics than generic service traces. In this pattern, a single request becomes a span tree that can include authentication, authorization, model routing, provider calls, and streamed responses. AI-specific conventions such as OpenInference add span kinds, token counts, model metadata, and typed input or output attributes so observability tools can distinguish an LLM call from a normal HTTP transaction. That matters because token usage, latency, and tool invocation are operational signals, not just logs.

Practical implication: standardise AI trace attributes early so security, platform, and application teams can correlate gateway activity without custom instrumentation.

Why asynchronous trace export matters for gateway security and latency

The gateway described in the article separates inference handling from trace export. Authentication, model resolution, and provider routing happen in memory, while span data is queued and exported over gRPC after the request path completes. That design keeps observability from becoming a blocking dependency and avoids turning external telemetry services into availability risks for the AI gateway itself. From a governance standpoint, the important point is that the control plane can observe request behaviour without inserting extra network hops into the decision path.

Practical implication: keep telemetry export out of the critical path so monitoring failures do not become user-facing model outages.

How content filtering changes the identity and data boundary

The Exclude Request Data toggle changes the security posture of trace export by removing prompt and completion content at the gateway before export. Structural trace data such as latency, token counts, model identifiers, and error status still moves to the backend, but the sensitive payload stays inside the environment. That is a meaningful boundary decision because traces often become high-value data sets that can expose secrets, personal data, or proprietary prompts if content is left intact. In identity terms, the gateway is acting as an enforcement point for what the AI system is allowed to reveal beyond its trust boundary.

Practical implication: treat prompt redaction as a control requirement, not a cosmetic setting, whenever traces cross into third-party observability.


NHI Mgmt Group analysis

AI gateway telemetry is becoming a governance control, not just an observability feature. Once a gateway validates identity, resolves model access, and exports traces, it is part of the decision boundary for AI systems. That makes the gateway relevant to IAM, PAM, and NHI governance because it can see and shape who or what is allowed to call models and with which context. Practitioners should treat gateway instrumentation as an access-control-adjacent function, not a separate monitoring layer.

Prompt content is now a governed data class, not just request payload. The article shows why trace pipelines need content filtering before export, because LLM inputs and outputs can contain secrets, personal data, and policy-sensitive instructions. This is the same governance pattern identity teams already apply to privileged session recording and secret handling, except the object under control is model traffic. The practical implication is that observability design must align with data classification and leakage prevention from the start.

Trace export creates a new trust boundary for agent and model workflows. Once AI traffic is exported to a third-party backend, the security question is no longer only whether the gateway authenticated the caller, but whether the observability path preserved the intended boundary. That is especially important for AI agents, where one request can cascade into multiple tool calls and downstream actions. Teams should assume the trace pipeline is part of the attack surface and apply the same scrutiny they would to any privileged integration.

Gateway policy is where AI governance becomes enforceable at runtime. The clearest advantage of this architecture is not that it makes traces prettier, but that it puts routing, authorization, and redaction in one runtime control point. That pattern is likely to become the default shape of AI governance because it centralises enforcement where model requests already pass. For practitioners, the lesson is to align gateway policy with identity lifecycle, data handling, and model access review processes.

Named concept: gateway-bound AI governance. This is the idea that the AI gateway becomes the operational place where identity checks, routing decisions, telemetry, and content controls converge. It matters because agent and model sprawl will otherwise fragment enforcement across applications, SDKs, and backend services. Security teams should use this control point to establish one consistent policy boundary for model access and trace handling.

What this signals

Gateway-bound AI governance: the control point that handles routing, authorization, and trace export is now where AI security policy becomes enforceable in practice. Teams that split these responsibilities across separate tools will keep rediscovering the same boundary failures, especially when prompts and tool calls cross organisational trust lines.

For identity programmes, the immediate signal is that AI gateways need the same lifecycle discipline as privileged integrations. That means access review for model entitlements, redaction rules for trace exports, and policy ownership that sits with the same governance model used for sensitive service accounts and delegated access.

The broader pattern is that observability is no longer neutral infrastructure. Once traces can contain prompts, the telemetry layer inherits data classification, retention, and exposure questions that belong in security architecture reviews, not only platform engineering meetings.


For practitioners

  • Classify gateway traces as governed security data Define which span attributes may contain sensitive content, then map them to data handling rules before enabling external export. Apply the same review discipline you would use for privileged session logs or secret-bearing telemetry, especially when prompts can include credentials or regulated data.
  • Redact prompt and completion fields at the gateway boundary Enable request-data exclusion wherever observability leaves the trust boundary, and validate that only structural metadata such as latency, token counts, model metadata, and error status is exported. Verify that the content never leaves the gateway pod in environments with compliance constraints.
  • Standardise AI trace schemas across gateway and backend tools Use a consistent span taxonomy and resource attributes so model_id, model_version, and provider context are searchable across observability systems. Align the gateway schema with OpenTelemetry and OpenInference conventions so security and platform teams can correlate behaviour without custom parsers.
  • Review AI gateway authorization and routing as a single control Treat JWT validation, model entitlement checks, and routing policy as one runtime decision chain, then test failure modes across all three. If any link is misconfigured, model access can drift away from intended identity policy even when observability is intact.
  • Test trace export failure without interrupting inference Simulate an unreachable OTLP backend and confirm that requests still complete while traces queue safely for later export or fail closed according to policy. This validates that monitoring dependencies do not become availability dependencies for model traffic.

Key takeaways

  • AI gateways now sit at the intersection of authentication, routing, observability, and data leakage control.
  • Exporting traces without redaction can preserve visibility while still widening the trust boundary for prompts and completions.
  • Identity and security teams should govern model access, trace content, and backend export as one control chain, not separate functions.

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 and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST AI RMF, NIST CSF 2.0 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10The article covers AI gateway governance and agent-style request flows with tool and model routing.
OWASP Non-Human Identity Top 10NHI-03Prompt-bearing traces and model access controls create NHI-like governance pressure around secrets and access.
NIST AI RMFGOVERNThe article is fundamentally about AI governance, ownership, and runtime control boundaries.
NIST CSF 2.0PR.AC-4Gateway authorization and model entitlements map to access management and least privilege.
NIST SP 800-53 Rev 5AC-6Least privilege is central to gateway authorization and model routing control.

Assign clear governance ownership for gateway policy, observability export, and sensitive-content handling.


Key terms

  • AI Gateway: A control point that sits between AI applications and the models, tools, or data they call. In practice, it can authenticate requests, enforce policy, inspect runtime behaviour, and stop unsafe actions before they spread into connected systems.
  • OpenTelemetry: An open standard for collecting and moving traces, metrics, and logs in a consistent format. It helps teams avoid re-instrumenting every system when tools change, and it supports cross-platform analysis by keeping telemetry structured and portable.
  • Name redaction: Name redaction is the practice of limiting exposed identity details in certificate records so public logs do not reveal more organisational or personal information than necessary. In certificate governance, it is a disclosure control that must be balanced against transparency requirements.
  • Span Tree: A span tree is the parent-child structure that represents one traced workflow from entry to completion. For LLM and agent systems, it can reveal authentication, routing, provider calls, and tool use, which makes it useful for debugging but also sensitive if payload content is retained.

What's in the full article

TruFoundry's full article covers the operational detail this post intentionally leaves for the source:

  • Step-by-step OTEL exporter configuration for the AI Gateway and Arize integration
  • Attribute mapping examples for model_id and model_version across trace views
  • Gateway-level exclusion behaviour for tfy.input, tfy.output, and tfy.input_short_hand
  • Verification workflow for checking span trees, filtering, and trace grouping in Arize

👉 The full TruFoundry article covers trace wiring, export settings, and verification steps for Arize.

Deepen your knowledge

The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, workload identity, secrets management, and the access-control patterns that underpin AI system oversight. It helps identity and security practitioners connect runtime enforcement to the broader governance model their programmes need.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 20, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org