Telemetry

  1. Action telemetry
  2. Browser extension telemetry
    1. Action Telemetry (a.k.a User event logs)
    2. UTM markers
    3. Error logging

Telemetry describes the logging of user events, such as a page view or search. Telemetry data is collected by each Sourcegraph instance and is not sent to Sourcegraph.com (except in aggregate form as documented in "Pings"). Some select managed instances enable event level (non-aggregated) telemetry.

Browser extension telemetry

Note: this section relates only to browser extension and not native integration telemetry

Action telemetry (a.k.a User event logs)

Browser extension telemetry data is sent only to the connected Sourcegraph instance URL (except in aggregate form as documented in "Pings").

  • In Chrome and Safari telemetry is always enabled
  • In Firefox telemetry is enabled if
    • connected to self-hosted Sourcegraph URL
    • or Send telemetry is checked on options page

All browser extension events are triggered with:

  • source: constant CODEHOSTINTEGRATION
  • anonymizedUserId: generated user ID, stored in browser local storage
  • sourcegraphURL: connected/configured Sourcegraph URL
  • platform: detected platform name (one of chrome-extension | safari-extension | firefox-extension)

Following event logs are triggered from the browser extension:

  • BrowserExtensionInstalled: triggered on initial install
  • hover: when successfully showing non-empty/non-error hover information
  • action.id: Sourcegraph extension action ID
    • when clicking any action from the command palette

    • or when clicking from the code view toolbar (e.g., "open in vs code")

UTM markers

UTM markers are used to add markers to links generated by a browser extension.

Currently following UTM markers are generated by browser extension:

  • /search?utm_source={platform-name}&utm_campaign=global-search: Github enhanced search feature (item in search dropdown)
  • /search?utm_source={platform-name}&utm_campaign=omnibox: Browser omnibox (a.k.a 'src'). > Note: omnibox is supported in Chrome and Firefox
  • /sign-in?close=true&utm_source={platform-name}: SignIn button instead of ViewOnSourcegraph when connected to self-hosted instance.
  • ?utm_source={platform-name}: "View File In Sourcegraph" button in file editor toolbar
  • ?utm_source={platform-name}: "View Diff In Sourcegraph" button in file editor toolbar
  • ?utm_source={platform-name}: "View Repo In Sourcegraph" button on the top
  • ?utm_source={platform-name}&utm_campaign=hover: All external links from hover overlay
  • ?utm_source={platform-name}&utm_campaign=browser-extension-uninstall&utm_content={extension-version}: When redirecting to about.sourcegraph.com/uninstall on browser extension uninstall

Error logging

We use Sentry to automatically log any errors in background/content scripts if Allow Error Reporting is enabled.

Note: Stack trace might include sensitive information stored in variables.