Connecting Claude Code to Agent Trust Hub
Bigeye can receive telemetry directly from Claude Code and show each session under Agent Trust. Once configured, every prompt, tool call, and response from Claude Code becomes a conversation with turn-by-turn detail, including which files, commands, and MCP resources (Google Drive, GitHub, Google Calendar) each turn touched.
No separate forwarder or proxy is required. Claude Code's built-in OpenTelemetry exporter and hooks send data straight to Bigeye.
What you'll see in Bigeye
- Agent Trust → Agents: one Claude Code agent that all of your organization's activity rolls up under, not one row per user.
- Agent detail → Conversations: one row per Claude Code session, showing the initial prompt, total tokens, cost, and the user who ran it.
- Conversation detail: one turn per prompt/response pair, with the tools used and every resource touched (files read, shell commands, Drive docs, GitHub files, and so on).
Prerequisites
- A personal API key, generated from Profile → API Keys in Bigeye.
- Your workspace ID, visible in the URL of any Bigeye page (
.../w/<workspace-id>/...). - Claude Code v2.1.193 or later. Older versions won't send assistant responses, so conversations will show your prompts but not Claude's replies.
The steps below target https://app.bigeye.com. If you're on a dedicated instance or self-hosted Bigeye, see Dedicated instance or self-hosted.
Setup
Add the following to ~/.claude/settings.json (create the file if it doesn't exist). Replace both REPLACE_ME values with your personal API key and workspace ID.
{
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "1",
"OTEL_LOGS_EXPORTER": "otlp",
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://app.bigeye.com/api/v1/claude-code",
"OTEL_EXPORTER_OTLP_HEADERS": "Authorization=apikey REPLACE_ME_API_KEY,x-bigeye-workspace-id=REPLACE_ME_WORKSPACE_ID",
"OTEL_LOG_USER_PROMPTS": "1",
"BIGEYE_API_KEY": "REPLACE_ME_API_KEY",
"BIGEYE_WORKSPACE_ID": "REPLACE_ME_WORKSPACE_ID"
},
"allowedHttpHookUrls": [
"https://app.bigeye.com/api/v1/claude-code/v1/hooks"
],
"allowedEnvVars": ["BIGEYE_API_KEY", "BIGEYE_WORKSPACE_ID"],
"hooks": {
"PreToolUse": [{
"matcher": "*",
"hooks": [{
"type": "command",
"command": "curl -fs --max-time 2 -X POST -H 'Content-Type: application/json' -H \"Authorization: apikey $BIGEYE_API_KEY\" -H \"x-bigeye-workspace-id: $BIGEYE_WORKSPACE_ID\" --data-binary @- https://app.bigeye.com/api/v1/claude-code/v1/hooks >/dev/null 2>&1 || true"
}]
}],
"PostToolUse": [{
"matcher": "*",
"hooks": [{
"type": "command",
"command": "curl -fs --max-time 2 -X POST -H 'Content-Type: application/json' -H \"Authorization: apikey $BIGEYE_API_KEY\" -H \"x-bigeye-workspace-id: $BIGEYE_WORKSPACE_ID\" --data-binary @- https://app.bigeye.com/api/v1/claude-code/v1/hooks >/dev/null 2>&1 || true"
}]
}],
"UserPromptSubmit": [{
"matcher": "*",
"hooks": [{
"type": "command",
"command": "curl -fs --max-time 2 -X POST -H 'Content-Type: application/json' -H \"Authorization: apikey $BIGEYE_API_KEY\" -H \"x-bigeye-workspace-id: $BIGEYE_WORKSPACE_ID\" --data-binary @- https://app.bigeye.com/api/v1/claude-code/v1/hooks >/dev/null 2>&1 || true"
}]
}],
"Stop": [{
"matcher": "*",
"hooks": [{
"type": "command",
"command": "curl -fs --max-time 5 -X POST -H 'Content-Type: application/json' -H \"Authorization: apikey $BIGEYE_API_KEY\" -H \"x-bigeye-workspace-id: $BIGEYE_WORKSPACE_ID\" --data-binary @- https://app.bigeye.com/api/v1/claude-code/v1/hooks >/dev/null 2>&1 || true"
}]
}]
}
}Start a fresh claude session so the new settings take effect.
What each setting does
| Setting | Purpose |
|---|---|
OTEL_EXPORTER_OTLP_ENDPOINT | Where Claude Code sends OTLP logs, metrics, and traces. |
OTEL_EXPORTER_OTLP_HEADERS | Your API key and workspace ID, sent with every request. |
OTEL_LOG_USER_PROMPTS=1 | Includes your actual prompt text. Without it, Bigeye shows "no prompt captured." |
hooks.* | Sends prompt text and tool inputs/outputs as they happen, so Bigeye can track turn boundaries in real time. |
allowedHttpHookUrls | Claude Code only allows hooks to call URLs listed here. |
allowedEnvVars | Lets Claude Code substitute $BIGEYE_API_KEY and $BIGEYE_WORKSPACE_ID into the hook commands. |
Dedicated instance or self-hosted
Replace https://app.bigeye.com everywhere in the snippet with your Datawatch host — for example https://<tenant>.bigeye.com, or http://localhost:8080 for local development. Update all four hook URLs, the OTLP endpoint, and the entry in allowedHttpHookUrls to match.
Verify it works
- Start a new
claudesession and send any prompt. - Wait about 10 seconds for the data to reach Bigeye.
- In Bigeye, go to Agent Trust. You should see a Claude Code agent shared across the workspace. Open it, find your session under Conversations, and confirm the prompt, response, and tool calls all appear.
If nothing shows up within 30 seconds, see Troubleshooting below.
What's captured, what's not
Captured:
- Prompt text, tokens, cost, and the assistant's response for each turn.
- Model,
cwd, OS, terminal, and Claude Code version. - Every tool call: file reads/writes, Bash commands, WebFetch URLs, and MCP calls.
- MCP calls to known systems (Google Drive, GitHub, Google Calendar) resolved to readable names and links.
- Access to catalog tables and columns, linked to the matching Bigeye dataset so it rolls up under the right asset.
Not captured:
- File contents — only paths, URLs, and metadata.
- Command output beyond what Claude Code includes in the hook payload.
- Anything Claude Code itself doesn't emit, such as internal reasoning traces.
Troubleshooting
No agent appears in Bigeye
-
Check that your API key is valid:
curl -f -H "Authorization: apikey $BIGEYE_API_KEY" -H "x-bigeye-workspace-id: $BIGEYE_WORKSPACE_ID" https://app.bigeye.com/api/v1/agent-conversations/list -d '{}' -X POST -H 'Content-Type: application/json'This should return HTTP 200.
-
Confirm the workspace ID matches the workspace your API key belongs to.
-
Restart
claude— settings only load at session start.
Conversation is empty, or shows "No prompt captured"
- Set
OTEL_LOG_USER_PROMPTS=1and start a new session. Claude Code masks prompts by default.
Hooks silently fail
-
Confirm
allowedHttpHookUrlshas the exact URL you're posting to. -
Test the endpoint directly:
echo '{"session_id":"test","hook_event_name":"UserPromptSubmit","prompt":"hi"}' | curl -X POST -H "Content-Type: application/json" -H "Authorization: apikey $BIGEYE_API_KEY" -H "x-bigeye-workspace-id: $BIGEYE_WORKSPACE_ID" --data-binary @- https://app.bigeye.com/api/v1/claude-code/v1/hooksThis should return
{"ok":true}.
Access detail shows no data even though tools ran
- Contact Bigeye support with the tool name and a redacted sample of its response so we can add support for it.
Updated 1 day ago
