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:

  • name: event name
  • source: constant CODEHOSTINTEGRATION
  • userCookieID: anonymous identifier for this user (allows site admins on a private Sourcegraph instance to see a count of unique users on a daily, weekly, and monthly basis)
  • url: connected/configured Sourcegraph URL
  • argument / publicArgument: detected platform name (one of chrome-extension | safari-extension | firefox-extension) and version

Following event logs are triggered from the browser extension:

  • BrowserExtensionInstalled: triggered on initial install
  • BrowserExtensionEnabled/BrowserExtensionDisabled: triggered on browser extension enabled toggle change
  • Bext_NumberURLs: number of Sourcegraph instances added to the browser extension
  • hover: when successfully showing non-empty/non-error hover information
  • goToDefinition.preloaded: triggered when code-intel popup "Go to definition" button was clicked, preloading the definition succeeded and at least one definition was found
  • findImplementations: triggered when code-intel popup "Find implementations" button was clicked
  • findReferences: triggered when code-intel popup "Find references" button was clicked

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.