Sourcegraph is designed to meet enterprise production readiness criteria. A key pillar of production readiness is the ability to observe, monitor, and analyze the health and state of the system.
Sourcegraph ships with a number of observability tools and capabilities:
- Metrics and dashboards via Prometheus and Grafana
- Health checks
- Other tools
If you are investigating a specific production issue, consult the troubleshooting guide.
A Sourcegraph service’s log level is configured via the environment variable
SRC_LOG_LEVEL. The valid values (from most to least verbose) are:
dbug: Debug. Output all logs. Default in cluster deployments.
warn: Warning. Default in Docker deployments.
If you are having issues with repository syncing, view the output of
An application health check status endpoint is available at the URL path
/healthz. It returns HTTP 200 if and only if the main frontend server and databases (PostgreSQL and Redis) are available.
The Kubernetes cluster deployment option ships with comprehensive health checks for each Kubernetes deployment.
- Sentry error reporting, configured via the
sentryproperty in site configuration
- Go net/trace
For help configuring monitoring and tracing on your Sourcegraph instance, use our public issue tracker.