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.
When naming the feature
of an event, adhere to the following rules:
.
**delimited format, e.g., myFeature.subFeature
.vscode
.
cody
as the feature or prefix it with cody.
, e.g., cody.someFeature
.When naming the action
of an event, follow these rules:
submit
, failed
, or success
.metadata
is an array of tuples with predefined keys and arbitrary numeric values, which is always exported with events to Sourcegraph.