Problem
When a user creates a PR via Claude Code (e.g., gh pr create), the PR URL is only available in the tool_response field which is redacted when OMIT_IO=true (default).
Claude Code surfaces PR links in its native UI, but this data isn't available in our telemetry.
Proposed solution
In PostToolUse event handling, scan tool_response for GitHub/GitLab PR URL patterns (e.g., github.com/.../pull/\d+) and emit them as a dedicated span attribute (vcs.pull_request.url) regardless of OMIT_IO setting.
This keeps PR metadata visible for observability without exposing other tool I/O content.
Considerations
- Should work with GitHub, GitLab, Bitbucket URL patterns
- Multiple PRs in a session could be collected as an array attribute
- Could also extract PR number and repo name as separate attributes
Problem
When a user creates a PR via Claude Code (e.g.,
gh pr create), the PR URL is only available in thetool_responsefield which is redacted whenOMIT_IO=true(default).Claude Code surfaces PR links in its native UI, but this data isn't available in our telemetry.
Proposed solution
In
PostToolUseevent handling, scantool_responsefor GitHub/GitLab PR URL patterns (e.g.,github.com/.../pull/\d+) and emit them as a dedicated span attribute (vcs.pull_request.url) regardless ofOMIT_IOsetting.This keeps PR metadata visible for observability without exposing other tool I/O content.
Considerations