This page documents best practices for how to write user telemetry events ****in “V2 Telemetry” within core Sourcegraph application components (Cody clients, web apps, and the backend).

V2 telemetry events are exported to some degree from all Sourcegraph instances, including the public Sourcegraph.com and single-tenant Sourcegraph instances (Cloud instances on-prem instances).

To learn more about higher-level Telemetry V2 architecture, also see Telemetry Gateway.

To learn more about integrating with Telemetry V2 as a managed service, refer to Reporting user events to Telemetry Gateway from a managed service instead.



Feature Naming Guidelines

When naming the feature of an event, adhere to the following rules:

Action Naming Guidelines

When naming the action of an event, follow these rules:

Parameters - Metadata

metadata is an array of tuples with predefined keys and arbitrary numeric values, which is always exported with events to Sourcegraph.