Telemetry Gateway
The Telemetry Gateway service is the service that ingests telemetry v2 events from all Sourcegraph instances, and is available at telemetry-gateway.sourcegraph.com
.
- As of 5.2.0, certain flags can be configured to export events that have been instrumented with the new APIs to Telemetry Gateway.
- For Sourcegraph instances that prior to 5.2.0, no events are exported. A custom mechanism did exist for exporting events specifically from Cloud instances based on individual service agreements with customers - the new telemetry events will supersede this mechanism.
Service images
Source code for Telemetry Gateway service is in sourcegraph/sourcegraph/cmd/telemetry-gateway.
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.
Local development
For local development, please refer to its How to set up Telemetry Gateway locally.
Operations
Here is a list of useful quick links:
- Prod instance:
telemetry-gateway.sourcegraph.com
- currently only accepts real Sourcegraph licenses. - Dev instance:
telemetry-gateway.sgdev.org
- currently only acceptsdev-private
licenses.
Infrastructure access
The following Entitle requests are needed to get access to Telemetry Gateway service infrastructure:
All engineers should have access to the dev project by default.
Deployment
The Telemetry Gateway service infrastructure is defined in sourcegraph/managed-services/services/telemetry-gateway
utilizing Managed Services Platform.
Modify deployment manifest
To modify the deployment manifest:
- Update
service.yaml
file - Anywhere in the repository, run
sg msp generate telemetry-gateway prod
- Stage changes and make a pull request
- 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
...
deploy:
type: manual
+ manual:
+ tag: 218287_2023-05-10_5.0-5bd03cd18e71
Observability
Metrics
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.