Metrics Exposed to StatsD

Codecov Metrics and Monitoring

Codecov Self-Hosted exports several meaningful metrics via a StatsD interface for consumption by other applications, such as Prometheus, Grafana, and DataDog. This page describes how to include StatsD in your Codecov Self-Hosted installation, and provides a reference to the metrics currently exposed to StatsD.

How to Integrate StatsD

For Docker Compose Based Installations

The best reference for docker compose based installations is this dockerfile, which shows Codecov Self-Hosted orchestrated with StatsD, Prometheus, and Grafana. This approach is recommended for all docker compose based deployments.

Metric Reference

📘

Metrics are Populated as They're Encountered

Codecov Self-Hosted does not initialize all metrics at startup. Rather, metrics are initialized when they're first encountered during program execution. If you find that you are not receiving certain metrics, it is likely they have not been passed to StatsD from Codecov Self-Hosted yet.

Last updated March 23rd, 2021

Web Components

MetricTypeDescription
web.redis.chunks.gettimerTime taken to decompress chunk files pulled from redis. Used in report merging
web.redis.chunks.settimerTime taken to write chunk files to redis. Used in report merging
web.archive.chunks.gettimerTime taken to retrieve chunks from the archive storage. Used in report merging.
web.uploads.acceptedincrementThe count of uploads successfully accepted by Codecov
web.uploads.rejectedincrementThe count of uploads rejected by Codecov

API Components

MetricTypeDescription
uploads.acceptedincrementThe count of uploads successfully accepted by Codecov (new endpoint v4)
uploads.rejectedincrementThe count of uploads successfully accepted by Codecov (new endpoint v4)

Worker Components

Metric

Type

Description

Notify Task (worker.task.app.tasks.notify)

timer

Time taken for the worker to send a notification

Upload Processor Task
(worker.task.app.tasks.upload_processor.UploadProcessorTask)

timer

Time taken to process an uploaded report

Team Sync Task
(worker.task.app.tasks.sync_teams.SyncTeams)

timer

Time taken to sync teams

Upload Task
(worker.task.app.tasks.upload.Upload)

timer

Time taken to retrieve a raw uploaded report from the archive

Repo Sync
(worker.task.app.tasks.sync_repos.SyncRepos)

timer

Time taken to sync repos from the Git provider

PR Sync Task
(worker.task.app.tasks.pulls.Sync)

timer

Time taken to complete a PR notification

celery.queue.%s.len

guage

Length of various upload queues. This is a very important set of metrics, and are used to indicate the length of currently active jobs that are remaining to be processed by Codecov at any given time. Ideally, the length of any of these queues should be at or near 0. %s can represent main Celery queue, "celery", Uploads queue "uploads" or New tasks queue "new_tasks"

Complete list of available metrics for self hosted customers can be obtained from your account rep.