Generated: 2026-04-01 Extraction basis:
- analytics event pipeline
- analytics metadata sanitization
- generated event envelope type
- all event logging callsites
The product references 666 unique analytics event names.
The telemetry system is not a side concern. It is effectively a product map for:
- agent behavior
- permissions
- OAuth
- MCP
- remote/bridge
- plugin lifecycle
- compaction
- session memory
- updater behavior
- worktree and file history
Companion raw inventory in this analysis bundle:
analysis/telemetry-event-inventory.md
The analytics entrypoint is intentionally dependency-light:
- events queue before a sink is attached
attachAnalyticsSink()drains the queue asynchronously- the public API is just
logEvent()andlogEventAsync()
Important design details in the analytics entrypoint:
- strings are intentionally discouraged in raw metadata types to reduce accidental code/path logging
_PROTO_*fields are stripped before general-access sinks and routed only to privileged first-party columns
The generated proto type ClaudeCodeInternalEvent includes:
event_namesession_idadditional_metadataauthparent_session_id
This tells us the durable event contract is:
- one named event
- one session identity
- one auth block
- one freeform metadata JSON payload
- optional parent-session linkage
The metadata layer shows deliberate PII controls:
- MCP tool names default to
mcp_toolunless logging is explicitly allowed - skill names are only extracted in controlled ways
- detailed tool-input serialization is gated behind
OTEL_LOG_TOOL_DETAILS - nested tool inputs are truncated and depth-limited before serialization
Important privacy gates:
- tool names are sanitized before analytics logging in privacy-sensitive cases
- detailed tool-name logging is separately gated
- detailed tool-input logging is separately gated
- tool-input extraction is bounded and truncated before serialization
Grouping the 666 unique events by the first token after tengu_ produces these largest families:
| Family | Approx. Unique Events |
|---|---|
mcp_* |
50 |
bash_* |
47 |
bridge_* |
46 |
oauth_* |
43 |
file_* |
39 |
session_* |
29 |
tool_* |
23 |
native_* |
22 |
agent_* |
21 |
auto_* |
20 |
plugin_* |
20 |
teleport_* |
18 |
streaming_* |
17 |
api_* |
16 |
This gives a reliable picture of where the product team has invested the most operational instrumentation.
Representative events:
tengu_api_querytengu_api_successtengu_api_errortengu_api_retrytengu_api_opus_fallback_triggeredtengu_model_fallback_triggeredtengu_model_whitespace_response
These events instrument both request lifecycle and model-behavior anomalies.
Representative events:
tengu_tool_use_can_use_tool_allowedtengu_tool_use_can_use_tool_rejectedtengu_tool_use_show_permission_requesttengu_tool_use_successtengu_tool_use_errortengu_tool_result_pairing_repairedtengu_tool_input_json_parse_failtengu_permission_request_option_selected
This is direct evidence that the model-tool contract is heavily observed in production.
Representative events:
tengu_bash_security_check_triggeredtengu_bash_ast_too_complextengu_bash_command_explicitly_backgroundedtengu_bash_tool_command_executed
The bash surface is one of the most instrumented subsystems in the product.
Representative events:
tengu_mcp_addtengu_mcp_deletetengu_mcp_server_connection_succeededtengu_mcp_server_connection_failedtengu_mcp_server_needs_authtengu_mcp_oauth_flow_starttengu_mcp_oauth_flow_successtengu_mcp_tool_call_auth_errortengu_mcp_large_result_handledtengu_mcp_channel_message
This confirms that MCP is first-class product infrastructure, not just optional extension code.
Representative events:
tengu_bridge_startedtengu_bridge_session_startedtengu_bridge_session_donetengu_bridge_repl_ws_connectedtengu_bridge_repl_reconnected_in_placetengu_bridge_heartbeat_errortengu_remote_create_sessiontengu_remote_setup_startedtengu_teleport_resume_sessiontengu_teleport_error_git_not_clean
This family is strong evidence that remote execution and session mobility are major product areas.
Representative events:
tengu_plugin_install_commandtengu_plugin_installedtengu_plugin_enabled_clitengu_plugin_disabled_clitengu_plugin_update_commandtengu_marketplace_addedtengu_marketplace_updatedtengu_official_marketplace_auto_install
Representative events:
tengu_compacttengu_compact_failedtengu_compact_ptl_retrytengu_cached_microcompacttengu_time_based_microcompacttengu_session_memory_inittengu_session_memory_extractiontengu_sm_compact_threshold_exceededtengu_memdir_loaded
Representative events:
tengu_auto_updater_successtengu_auto_updater_failtengu_native_auto_updater_starttengu_native_install_package_successtengu_native_install_binary_failuretengu_version_lock_acquiredtengu_version_lock_failed
The telemetry families imply the following product priorities:
- shell safety and permissioning are operationally important
- MCP and remote/bridge are deeply monitored
- plugin/marketplace behavior is now productized
- model behavior is watched for malformed tool input, whitespace responses, fallback cases, and stall conditions
- compaction and memory systems are important enough to warrant dedicated failure and recovery events
The unique event names in this document were extracted with:
rg -o --no-filename "logEvent(?:Async)?\\(\\s*'[^']+'" src \
| sed "s/.*('//; s/'$//" \
| sort | uniqThat command currently yields 666 unique names.
For self-contained transfer, the full alphabetical inventory is preserved separately in:
analysis/telemetry-event-inventory.md
If you want to go even deeper, the next telemetry-focused artifacts would be:
- per-event file/callsite index
- event family to subsystem map
_PROTO_*field catalog for privileged first-party storage- metadata field taxonomy by event family
Even without those, the current source already exposes a large amount of product intent through telemetry naming alone.