Observability

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:

If you are investigating a specific production issue, consult the troubleshooting guide.

Logs

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.

Health checks

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.

Other tools

Support

For help configuring monitoring and tracing on your Sourcegraph instance, use our public issue tracker.