Join our Newsletter — 33% off our NHI Course
Home FAQ AI Security How should security teams choose between proxy-based and…
AI Security

How should security teams choose between proxy-based and SDK-based observability for production AI applications?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated August 24, 2026 Domain: AI Security

Teams should prefer SDK-based observability when reliability, latency, and full application context matter. A proxy adds a dependency in the request path and only sees traffic that passes through it. SDK tracing logs asynchronously outside the critical path, so it preserves latency, avoids a single point of failure, and captures tool calls, retrieval steps, and business logic alongside LLM activity.

Why This Matters for Security Teams

Choosing between proxy-based and SDK-based observability is not just an instrumentation preference. It affects whether production AI telemetry is complete, timely, and resilient enough for incident response, model governance, and audit review. A proxy can be useful for central control, but it also introduces a dependency in the request path and may miss application context that matters for investigation. SDK-based observability usually gives richer traces because it can capture tool calls, retrieval steps, and business decisions alongside model activity. That matters when teams need to reconstruct how an AI application reached a result.

Security leaders should treat this as a control design decision, not a logging implementation detail. Current guidance from the NIST Cybersecurity Framework 2.0 emphasises visibility, detection, and response as operational capabilities, which means telemetry must survive normal production failure modes and remain trustworthy under pressure. In AI systems, that also extends to prompts, retrieval sources, tool execution, and output handling. If observability is incomplete, teams may see the model response without the path that produced it, which weakens root-cause analysis and policy enforcement. In practice, many security teams discover their observability gap only after a production incident has already obscured the evidence they needed.

How It Works in Practice

Proxy-based observability places a service between the application and the model provider. That service can enforce policy, redact content, centralise logs, and standardise outbound requests. It is strongest when a team needs a chokepoint for governance or where multiple applications must share a common control plane. The tradeoff is that the proxy only sees traffic that actually traverses it, and it can become a bottleneck or failure domain if it is tightly coupled to production traffic.

SDK-based observability instruments the application directly. The application emits traces, metrics, and logs from inside the request flow, which usually gives better context and lower operational risk. It can capture events that a proxy cannot see, such as local prompt assembly, function calls, retrieval augmentation steps, retries, and post-processing decisions. That makes it better suited to production AI applications where latency, completeness, and service resilience matter. It also fits better with distributed tracing practices because the AI workflow can be linked to upstream user actions and downstream business systems.

  • Use a proxy when policy enforcement and central mediation are the priority.
  • Use SDK tracing when full execution context and low-latency operation are the priority.
  • Use both when governance requires central inspection but engineering needs in-process telemetry.
  • Define what must be logged before deployment, including prompts, outputs, tool calls, and retrieval references.

For AI-specific governance, teams should align observability with model risk and security monitoring practices described in the NIST AI Risk Management Framework. That means validating telemetry integrity, controlling access to logs, and ensuring traces are useful for both security operations and model oversight. If the application uses agents, observability should also cover tool permissions and action boundaries, because execution authority is often where the highest risk sits. These controls tend to break down in serverless or highly ephemeral environments because short-lived execution paths and asynchronous batching can separate the model event from the business transaction.

Common Variations and Edge Cases

Tighter observability often increases integration effort and privacy overhead, requiring organisations to balance operational insight against data minimisation and developer friction. In practice, the right answer is not always proxy versus SDK. Many mature teams use SDK tracing for application-level fidelity and a proxy only for selective enforcement, egress control, or emergency containment.

Best practice is evolving for regulated AI deployments, especially where logs may contain personal data, secrets, or sensitive retrieval content. If an organisation operates in a cloud-native stack with high request volume, an SDK-first pattern usually scales better because it avoids making telemetry depend on a single gateway. If the environment is shared across many teams, a proxy may still be useful for standardising policy, but it should not be the only source of truth. There is no universal standard for this yet, so teams should test what they can actually reconstruct during a simulated incident, not what their architecture diagram implies.

Where agentic AI is involved, proxy-only designs often miss the most important evidence: the internal decision steps that led to a tool invocation. That is why NHI Management Group recommends treating the AI runtime, its toolchain, and its telemetry as one security boundary. For governance teams, the practical test is simple: can the organisation prove what happened, who or what initiated it, and which context the model used to decide? If not, the observability design is not ready for production accountability.

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 MITRE ATLAS address the attack and risk surface, while NIST CSF 2.0, NIST AI RMF and NIST AI 600-1 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST CSF 2.0DE.CM-01Observability choice directly affects security monitoring coverage and event visibility.
NIST AI RMFAI RMF governs risk monitoring, traceability, and accountability for AI systems.
OWASP Agentic AI Top 10Agentic systems need visibility into tool use and action boundaries, not just prompts.
MITRE ATLASAML.TA0003Adversarial AI techniques include abuse that observability should help expose.
NIST AI 600-1GenAI guidance stresses lifecycle controls, logging, and operational monitoring.

Instrument AI apps so monitoring data is complete enough to detect and investigate abnormal behaviour.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on August 24, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org