Join our Newsletter — 33% off our NHI Course

Agent telemetry in OpenTelemetry: what security teams should capture

 

(@nhi-mgmt-group)
Member Moderator
Joined: 1 year ago
Posts: 18346
Topic starter  

TL;DR: Agent harnesses for Claude Code and Codex already emit security-relevant telemetry such as tool calls, approvals, command output, and permission decisions, but most of it is only visible if OpenTelemetry export is enabled, according to TENZIR. The operational gap is not data absence but collection, normalization, and retention across local sessions, model APIs, and MCP paths.

Editorial analysis by NHI Mgmt Group, based on content published by TENZIR: “What your agent harness telemetry tells you”.

Key questions

Q: What should security teams do first when AI agents start running commands and calling tools?

A: Start by turning on central telemetry export for the harnesses that can execute actions, then verify that approvals, tool calls, and session identifiers arrive in a collector you actually monitor.

Q: Why does partial agent telemetry create governance risk?

A: Because local session files, model APIs, and MCP servers each see only part of the activity, no single source can reliably prove what the agent touched or who allowed it.

Q: How do security teams know whether agent telemetry is actually working?

A: Telemetry is working when it captures tool calls, lifecycle events, and message traces in a way that supports investigation and correlation.

Practitioner guidance

  • Enable OpenTelemetry export for all agent harnesses Turn on OTLP export in every environment where an agent can run commands, call tools, or request approvals, and make the collector the authoritative destination for security review.
  • Classify and redact sensitive telemetry fields Treat prompt text, command lines, arguments, and output as potentially sensitive content, then hash, redact, or route them according to your logging policy before long-term retention.
  • Correlate agent events with identity and endpoint logs Join approval events, tool calls, sandbox outcomes, and session identifiers with user, host, and endpoint telemetry so investigations can reconstruct who authorised what and when.

Bottom line: Agent harnesses already generate security-relevant evidence, but defenders only benefit when export, retention, and correlation are designed into the pipeline.

Explore further

View Full Forum →  |  NHI Foundation Course →  |  Our Services →  |  Read the full analysis →



   
Quote
(@mr-nhi)
Member Moderator
Joined: 6 months ago
Posts: 17926
 

Agent telemetry is becoming a governance control, not just an observability feature. When an AI agent can touch files, run commands, and call tools, the security value lies in the approval trail and execution context. That makes telemetry part of the control plane for agentic AI, especially where machine identity, delegated access, and auditability overlap. Practitioners should treat this as a policy and evidence design problem, not a logging exercise.

A few things that frame the scale:

  • Claude Code-assisted commits leaked secrets at a rate of 3.2%, more than double the human-only baseline of 1.5%, with peaks reaching 31 secrets per 1,000 commits in August 2025, according to the State of Secrets Sprawl 2026.
  • 92% of organisations expose NHIs to third parties, raising concerns about supply chain security, according to the Ultimate Guide to NHIs.

A question worth separating out:

Q: What happens if prompts or command arguments are exported without filtering?

A: Sensitive content can leave the machine and land in systems that were never intended to hold it, including security platforms, archives, or downstream analytics. Teams should classify those fields up front and apply redaction or hashing before they expand retention beyond the workstation.

👉 Read our full editorial: Agent telemetry in OpenTelemetry gives security teams usable evidence



   
ReplyQuote
Share:

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.