Pings

Overview

Each ping collects anonymized usage statistics that help Sourcegraph understand how instances are being used. The data includes:

For complete details on collected data, refer to  https://sourcegraph.com/docs/admin/pings#pings

System Diagram

flowchart TD
    A[Sourcegraph Instance] -->|HTTP Request| B[pings.sourcegraph.com]
    B -->|HTTP Response: 204 No Content or 200 OK| A
    B -->|JSON Blob| C[Google Pub/Sub Topic]
    C -->|Subscribe| D[Dataflow Job]
    D -->|Batch Insert| E[BigQuery Raw Data Table]
    F[Analytics/Reporting]
    E -->|Query| F
    
    classDef sourceInstance fill:#d9f7be,stroke:#389e0d
    classDef webService fill:#bae7ff,stroke:#1890ff
    classDef googleService fill:#f5f5f5,stroke:#8c8c8c
    classDef dataProcessing fill:#fff2e8,stroke:#fa8c16
    classDef visualization fill:#f9f0ff,stroke:#722ed1
    
    class A sourceInstance
    class B webService
    class C,E,G googleService
    class D,F dataProcessing
    class H visualization

Ping Response

The pings.sourcegraph.com service responds with one of two status codes:

Status Code Meaning Payload
204 No Content Instance is running the latest version None
200 OK Update is available New version string

Data Processing Pipeline

  1. Collectionpings.sourcegraph.com receives HTTP requests and serializes data to JSON
  2. Queueing: JSON blobs are published to Google Pub/Sub for reliable processing
  3. Transformation: A Dataflow job:
  4. Storage: Processed data is inserted into BigQuery

V2 Telemetry

Overview