Skip to content

OTel: emit url.full/server.address and file.path on execute_tool spans without full content capture #5660

Backlog

Description

@k4otix

Describe the feature or problem you'd like to solve

With content capture off (the default), execute_tool spans carry only the tool name, call id and (for shell) the exit code. The target of the call (the URL fetched, the file read or written) is available only inside gen_ai.tool.call.arguments or the github.copilot.tool.parameters.* attributes, and both need telemetry.capture.toolArguments. That also exports full commands, file bodies and patches.

Many organisations can't approve full argument capture for privacy reasons. A file path or destination host is far less sensitive than file content, yet it is the main signal for many security detections.

Proposed solution

Add standard semantic-convention attributes on execute_tool spans, independent of content capture, or under a separate, narrower capture class (for example telemetry.capture.toolTargets):

  • Network tools (web_fetch, and MCP HTTP tools where known): server.address, server.port, url.scheme. Put url.full behind content capture.
  • File tools (view, create, edit, apply_patch, glob, grep): file.path (or file.directory + file.name). For apply_patch, emit one value per touched file, plus the operation (add, update, delete).
  • Shell: process.executable.name already exists. Also add the first token of the command (the program name) as github.copilot.tool.shell.program.

Example prompts or workflows

  • Alert when the agent reads browser credential stores or ~/.ssh/*, or writes to ~/.ssh/authorized_keys, without exporting file contents.
  • Alert when web_fetch contacts paste sites or out-of-band testing domains.
  • Report which hosts agents contact, for egress allowlisting.
  • Keep content capture off fleet-wide but still meet audit requirements on file access.

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions