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.
NOTE: If you're using the Kubernetes cluster deployment option, see the Kubernetes cluster administrator guide for more information.
Sourcegraph ships with a number of observability tools and capabilities:
- Metrics and dashboards via Prometheus and Grafana
- Tracing
- Alerting
- Logs
- 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.info: Informational.warn: Warning. Default in Docker deployments.eror: Error.crit: Critical.
If you are having issues with repository syncing, view the output of repo-updater's logs.
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
- Honeycomb
For help configuring monitoring and tracing on your Sourcegraph instance, use our public issue tracker.