bext: add firstSourcegraphUrl to logs
Created by: taras-yemets
Closes #32249 (closed)
Adds firstSourcegraphUrl
to logs when default Sourcegraph URL is used.
Notes
- tested in Chrome
- telemetry is disabled for Firefox, so logs are not sent at all, see:
Test plan
- Run
sg run bext
for dev version oryarn --cwd client/browser build
for prod one. - Set Sourcegrapg URL value to sourcegraph.com.
- Open a file on a code host (for example, this one).
- Open browser extension background page.
- Perform an action being logged (for example, hover on a token to see a code intel popup).
- Inspect
logEvent
requests on the network tab of browser extension background page. - Ensure that
firstSourceUrl
value is present in the request payload. - Change Sourcegrapg URL value (for example, to k8s.sgdev.org).
- Repeat steps 5 and 6.
- Ensure that
firstSourceUrl
value is not present in the request payload.