Understanding Proxy Settings for Telemetry
Sourcegraph uses telemetry to collect data for analytics and monitoring. When setting up telemetry, it's important to configure your HTTP proxy settings correctly to ensure data is sent and received without issues.
Air-Gapped Mode vs Restricted Networks
Air-gapped mode is a deployment configuration for environments with zero internet connectivity (fully isolated networks). Air-gapped environments require specific contract and license agreements. Customers who do not meet the requirements but are in restricted networks should allowlist pings.sourcegraph.com and telemetry-gateway.sourcegraph.com to enable telemetry and analytics.
Supported Proxy Environment Variables
TELEMETRY_HTTP_PROXY: Specifically used for pings and update checks to pings.sourcegraph.com.HTTP_PROXYandHTTPS_PROXY: Standard environment variables respected by the operating system and underlying network libraries.
Configuring Your Proxy
To ensure telemetry requests are routed correctly through your proxy, set the appropriate environment variables on your Sourcegraph instance. This includes setting TELEMETRY_HTTP_PROXY for update check requests to pings.sourcegraph.com.
For the telemetry gateway exporter (which exports events to telemetry-gateway.sourcegraph.com), standard proxy environment variables like HTTP_PROXY and HTTPS_PROXY may be respected, but allowlisting the telemetry gateway domain is the recommended approach for restricted network environments.
Troubleshooting Connection Issues
If you encounter connection errors, such as timeouts or blocked traffic, consider the following steps:
Check firewall and egress configurations to ensure that traffic to
telemetry-gateway.sourcegraph.comis allowed.Verify that the domain names or IP addresses for
pings.sourcegraph.comandtelemetry-gateway.sourcegraph.comare allowlisted.Review
sourcegraph-frontendandworkerservice logs for any error messages related to telemetry exports and address them accordingly.Ensure the
TELEMETRY_HTTP_PROXYenvironment variable is correctly formatted as a valid URL (e.g.,http://proxy.example.com:8080).Check the telemetrygateway-exporter section on the Background jobs page (
https://sourcegraph.example.com/site-admin/background-jobs) for errors or failed export attempts.
Additional Resources
For more detailed instructions, refer to the Sourcegraph documentation on using an HTTP proxy for telemetry requests.