From 33f3d0ccc5fde9eb0ab2f9bedb228111747fde0e Mon Sep 17 00:00:00 2001 From: Enrique Gonzalez Date: Fri, 16 Oct 2026 18:30:20 +0000 Subject: [PATCH 1/2] Set TELEMETRY_HTTP_PROXY on worker for pings in 8.0+ Sourcegraph 8.0 moved the ping and update check routine from sourcegraph-frontend to the worker's update-check job (sourcegraph/sourcegraph#15169), so TELEMETRY_HTTP_PROXY only takes effect on worker. Update the proxy section and the frontend-specific troubleshooting steps. Amp-Thread-ID: https://ampcode.com/threads/T-01a145ed-36a6-773b-8610-aae1481725d1 Co-authored-by: Amp --- docs/admin/pings.mdx | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/docs/admin/pings.mdx b/docs/admin/pings.mdx index 5613b3497..d3df0caf2 100644 --- a/docs/admin/pings.mdx +++ b/docs/admin/pings.mdx @@ -206,9 +206,13 @@ Refer to [outbound access to Sourcegraph services](/self-hosted/private-network# ## Using an HTTP proxy for ping requests -The environment variable `TELEMETRY_HTTP_PROXY` can be set on the `sourcegraph-frontend` service, to use an HTTP proxy for ping requests. +The `worker` service sends ping requests. To send them through an HTTP proxy, set the `TELEMETRY_HTTP_PROXY` environment variable on the `worker` service: -Be sure to update the environment variable like so : `TELEMETRY_HTTP_PROXY:"http://proxy.example.com:8080"` +```yaml +TELEMETRY_HTTP_PROXY: "http://proxy.example.com:8080" +``` + +Sourcegraph 7.7 and earlier send pings from `sourcegraph-frontend` and read `TELEMETRY_HTTP_PROXY` there. If you set it on `sourcegraph-frontend`, move it to `worker` when you upgrade to 8.0 or later. ## Connections to Sourcegraph-managed services @@ -229,7 +233,7 @@ The Cody app connects to Sourcegraph.com to send a limited selection of the ping It may happen that Sourcegraph will stop sending critical telemetry to Sourcegraph.com, if this happens it may indicate a problem with Sourcegraph's frontend database, or a site settings misconfiguration. Below are some debugging steps. -Sourcegraph telemetry pings are handled by a goroutine running on Sourcegraph's frontend service called `updatecheck`, `updatecheck` is started on container startup and periodically requests a variety of queries be run in the `pgsql` database. +The `update-check` job in the `worker` service sends telemetry pings. Every 30 to 40 minutes, it runs a variety of queries against the `pgsql` database and sends the results. If you run several `worker` replicas, only one of them runs the job at a time. ### Misconfigured update.channel @@ -241,26 +245,12 @@ The most common scenario in which Sourcegraph stops sending pings is a change to _This setting must be set to "release" in order for the telemetry goroutine to run._ -### Check if the goroutine is running - -_This section is under development and currently only applies for docker-compose instances._ - -If it's reported that pings aren't being sent to the Sourcegraph.com, you can check that the goroutine is running with the following command: - -``` -docker exec -it sourcegraph-frontend-0 sh -c 'wget -nv -O- 'http://127.0.0.1:6060/debug/pprof/goroutine?debug=1' | grep updatecheck' -``` - -Example: +### Check that the worker runs the update-check job -``` -[ec2-user@latveria-ip ~]$ docker exec -it sourcegraph-frontend-0 sh -c 'wget -nv -O- 'http://127.0.0.1:6060/debug/pprof/goroutine?debug=1' | grep updatecheck' -2022-04-05 20:53:32 URL:http://127.0.0.1:6060/debug/pprof/goroutine?debug=1 [14660] -> "-" [1] -# 0x1f052c5 github.com/sourcegraph/sourcegraph/cmd/frontend/internal/app/updatecheck.Start+0xc5 github.com/sourcegraph/sourcegraph/cmd/frontend/internal/app/updatecheck/client.go:697 -``` +If pings aren't reaching Sourcegraph, check that at least one `worker` instance runs the `update-check` job. A `worker` runs the job unless its `WORKER_JOB_ALLOWLIST` environment variable omits `update-check` (the default, `all`, includes it) or its `WORKER_JOB_BLOCKLIST` lists it. See [Split jobs and scale independently](/self-hosted/workers#3-split-jobs-and-scale-independently). ### Looking for errors in the logs -If the `update.check` is running, and the advanced configuration is correctly configured, then it may be the case that `pgsql` is failing to return data from the SQL queries to the `frontend`. Check out the frontend logs for logs tagged [`telemetry: updatecheck failed`](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/sourcegraph/sourcegraph%24+file:%5Ecmd/frontend/internal/app/updatecheck/client%5C.go+telemetry:+updatecheck+failed&patternType=literal). +If the `update-check` job is running and the site configuration is correct, the ping request may be failing, or `pgsql` may be failing to return data from the queries to the `worker`. Check the `worker` logs for `updatecheck failed` errors. If issues persist, please reach out to a team member for support at support@sourcegraph.com From 27eca1aa1730550420d957fa2fbf6db1048e90c5 Mon Sep 17 00:00:00 2001 From: Enrique Gonzalez Date: Fri, 16 Oct 2026 18:49:30 +0000 Subject: [PATCH 2/2] Drop the 7.7 upgrade note from the pings proxy section Amp-Thread-ID: https://ampcode.com/threads/T-01a145ed-36a6-773b-8610-aae1481725d1 Co-authored-by: Amp --- docs/admin/pings.mdx | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/admin/pings.mdx b/docs/admin/pings.mdx index d3df0caf2..62a869823 100644 --- a/docs/admin/pings.mdx +++ b/docs/admin/pings.mdx @@ -212,8 +212,6 @@ The `worker` service sends ping requests. To send them through an HTTP proxy, se TELEMETRY_HTTP_PROXY: "http://proxy.example.com:8080" ``` -Sourcegraph 7.7 and earlier send pings from `sourcegraph-frontend` and read `TELEMETRY_HTTP_PROXY` there. If you set it on `sourcegraph-frontend`, move it to `worker` when you upgrade to 8.0 or later. - ## Connections to Sourcegraph-managed services See [Connections to Sourcegraph-managed services](/admin/architecture#connections-to-sourcegraph-managed-services) in the architecture overview.