Skip to content

Prometheus Metrics

The application exposes Prometheus metrics at the /metrics endpoint. This endpoint provides various metrics about the application's performance and health, which can be scraped by a Prometheus server for monitoring purposes. When both HTTP_TLS_CERT_FILE and HTTP_TLS_KEY_FILE are set, the metrics endpoint is served over HTTPS as well.

By default, this endpoint is available on Port 9120, but can be configured using the METRICS_PORT environment variable, see App Settings.

Available Metrics

The table lists every metric family, its type and description, and the label names attached to its time series. Metric names use the doco_cd_ prefix.

Metric name Type Description Labels
doco_cd_info Gauge Application information version, log_level, start_time
doco_cd_polls_total Counter Number of successful polls repository
doco_cd_poll_errors_total Counter Failed polling attempts repository
doco_cd_poll_duration_seconds Histogram Duration of polling operations in seconds repository
doco_cd_auto_discovery_cache_total Counter Auto-discovery cache lookups by result (hit, miss, or bypass for scans read fully or partly from disk) repository, result
doco_cd_webhook_requests_total Counter Total number of webhook requests received repository
doco_cd_webhook_errors_total Counter Total number of errors in webhook processing repository
doco_cd_webhook_duration_seconds Histogram Duration of webhook processing in seconds repository
doco_cd_deployments_total Counter Total number of deployments processed repository, deployment, context
doco_cd_deployment_errors_total Counter Total number of errors during deployments repository, deployment, context
doco_cd_deployment_duration_seconds Histogram Duration of deployment operations in seconds repository, deployment, context
doco_cd_deployment_stage_duration_seconds Histogram Duration of deployment stages in seconds repository, stage, outcome
doco_cd_deployment_queue_duration_seconds Histogram Time deployments spend waiting for admission in seconds repository, outcome
doco_cd_pre_deploy_operation_duration_seconds Histogram Duration of pre-deploy sub-operations operation, outcome
doco_cd_source_preparation_duration_seconds Histogram Duration of deployment source preparation in seconds source, outcome
doco_cd_git_mirror_lock_wait_seconds Histogram Time spent waiting for a bare Git mirror lock in seconds mode
doco_cd_git_mirror_lock_held_seconds Histogram Time a bare Git mirror lock was held in seconds (shared: reads, exclusive: fetches and exports) mode
doco_cd_deployments_active Gauge Number of currently active deployments repository
doco_cd_deployments_queued Gauge Number of queued deployments waiting to start repository
doco_cd_pre_deployments_active Gauge Number of active pre-deployment checks repository
doco_cd_pre_deployments_queued Gauge Number of pre-deployment checks waiting for admission repository
doco_cd_deployment_admission_duration_seconds Histogram Time deployment work spends waiting for phase admission repository, phase, outcome
doco_cd_sync_window_blocked_total Counter Total number of deployments and stack removals deferred by a sync window repository, deployment, context, window
doco_cd_scheduled_runs_total Counter Total number of scheduled job runs processed context, stack, job, mode, execution_mode
doco_cd_scheduled_run_errors_total Counter Total number of failed scheduled job runs context, stack, job, mode, execution_mode
doco_cd_scheduled_run_skipped_total Counter Total number of skipped scheduled job runs context, stack, job, mode, execution_mode, reason
doco_cd_scheduled_run_duration_seconds Histogram Duration of scheduled job runs in seconds context, stack, job, mode, execution_mode
doco_cd_scheduled_runs_active Gauge Number of currently active scheduled job runs context, stack, job, mode, execution_mode
doco_cd_mcp_requests_total Counter Total number of dispatched MCP tool calls tool
doco_cd_mcp_errors_total Counter Total number of failed dispatched MCP tool calls tool
doco_cd_mcp_request_duration_seconds Histogram Duration of dispatched MCP tool calls in seconds tool
doco_cd_git_mirror_packs Gauge Highest number of packfiles among the bare git mirrors of a repository repository
doco_cd_git_mirror_size_bytes Gauge Combined size of the packfiles in all bare git mirrors of a repository in bytes repository
doco_cd_git_mirror_compactions_total Counter Total number of bare git mirror packfile compactions by mode and result repository, mode, result
doco_cd_git_mirror_compaction_duration_seconds Histogram Duration of bare git mirror packfile compactions by mode in seconds repository, mode
doco_cd_artifact_gc_removed_total Counter Total number of source artifacts removed by the artifact garbage collector repository
doco_cd_artifact_gc_kept Gauge Number of source artifacts kept by the last artifact garbage collector sweep repository
doco_cd_source_gc_evicted_total Counter Total number of unused source stores whose caches were evicted by the source garbage collector None

Most operation-duration histograms have bucket boundaries from 5 milliseconds through 10 minutes: Prometheus' default boundaries plus 20, 30, 60, 120, 300, and 600 seconds. MCP request duration uses Prometheus' default buckets (5 milliseconds to 10 seconds), while Git mirror compaction duration uses 12 exponentially increasing buckets starting at 50 milliseconds. Prometheus exposes histogram data as _bucket, _sum, and _count series.

Each histogram _bucket series has an additional Prometheus-generated le label for the bucket's inclusive upper bound. Bucket counts are cumulative; for each combination of the listed labels, the le="+Inf" bucket has the same count as _count. The generated le label is not listed in the table and does not appear on _sum or _count series.

doco_cd_deployment_stage_duration_seconds uses only the repository, stage, and outcome labels. This avoids creating a large number of series; use doco_cd_deployment_duration_seconds for individual deployment durations.

Grafana Dashboard

An example for a Grafana Dashboard can be found at Grafana Dashboard #583.