Skip to main content

Module telemetry_features

Module telemetry_features 

Source
Expand description

The closed registry of feature codes for telemetry (3.11.1+).

A code names what LeanCTX did, never with what: cli.pack.export, index.graph. CLI arguments are matched against the fixed lists below and only the matching literal is counted, so a path, file name, query or any other user input can never become a code. Commands on the hot path of every shell command or editor event are not counted at all; the daily usage record already covers that work.

Enums§

Feature
Background features with a fixed code.

Functions§

cli_code
The feature code for a CLI invocation, or None when it is not counted. A --dry-run promises to write nothing, the usage counter included.
record
Counts one run of a background feature and whether it succeeded.
record_cli
Counts a CLI invocation. Never fails the command.
record_mcp_session_end
Counts how an MCP session ended. Every exit path (transport closed, parent gone, idle exit) calls this before its final send; only the first call of a process counts.
record_mcp_session_start
Counts an MCP server start after the handshake.