Pings service

The Pings service is the service that collects ping requests from all Sourcegraph instances, and is available at

  • As of 5.2.0, ping requests are sent to directly.
  • For Sourcegraph instances that prior to 5.2.0, all ping requests sent to are being transparently forwarded to

NOTE: There is now a generated operations reference for the MSP-based Pings service in Pings infrastructure, generated by sg msp operations - as the generated docs improve, some content from this page will be migrated away.

Service images

Source code for Pings service is in sourcegraph/sourcegraph/cmd/pings. The image gets built the same way as any other Sourcegraph service, i.e. with insiders, the standard main-branch and main-dry-run tags.

All images tags are available in the Docker Hub.

Local development

For local development, please refer to its README.


Infrastructure access

Refer to Pings infrastructure (go/msp-ops/pings) for Entitle requests that are needed to get access to Pings service infrastructure:


The Pings service infrastructure is defined in sourcegraph/managed-services/services/pings utilizing Managed Services Platform.

Modify deployment manifest

To modify the deployment manifest:

  1. Update service.yaml file
  2. In the repository root, run sg msp generate services/pings/service.yaml prod
  3. Stage changes and make a pull request
  4. The Terraform Cloud rolls out changes

Use a different image tag

To specify a Docker image tag other than the default, update the service.yaml:

 - id: prod
     type: manual
+    manual:
+      tag: 218287_2023-05-10_5.0-5bd03cd18e71

Re-deploy the same manifest

Go to the “Deploy revision” page of the Cloud Run service and click DEPLOY (bottom of the page) without changing any configuration. This will also happen whenever a Terraform change happens to the “cloudrun” stack.

Update the service resource allocations

The following section in the service.yaml defines the resource allocation for the Cloud Run service instances:

  - id: prod
        cpu: 1 # Per-instance CPU
        memory: 1Gi # Per-insatnce memory
        maxCount: 3 # Maximum count of instances
        minCount: 1 # Minimum count of instances, setting to 1 can avoid cold start

Once updated, follow the Modify deployment manifest to apply the changes.



All alerts from all environments currently go to #alerts-pings-sourcegraph-com.


The deployment’s Cloud Run metrics overview page provides basic observability into the service provided out-of-the-box by Cloud Run, such as instance count and resource utilization.

Pings service also pushes GCP Custom Metrics via OpenTelemetry metrics.