Metrics reference
The server exposes Prometheus metrics at GET /metrics. Access fails closed: the endpoint answers 401 unless METRICS_AUTH_TOKEN is set (scrapers then send it as a bearer token) or METRICS_ALLOW_ANONYMOUS=true. See Monitoring for the scrape configuration and how to read the families.
Labelled metrics only appear after their first observation. Gauges of the database pools and of federation peers are read at scrape time.
The Go runtime (go_*) and process (process_*) metrics of the standard client library are exposed as well and not listed here.
Audit log
| Metric | Type | Labels | Help |
|---|---|---|---|
openartifact_audit_dropped_total | counter | none | Total number of audit events dropped due to backpressure. |
openartifact_audit_retention_deleted_total | counter | none | Total number of audit log entries deleted for being older than audit.retentionDays. |
openartifact_audit_retention_last_run_timestamp_seconds | gauge | none | Unix time the last audit retention pass finished without error on this replica (a pass that found nothing to delete counts). |
Blob store
| Metric | Type | Labels | Help |
|---|---|---|---|
openartifact_blob_bytes_total | counter | operation | Total bytes transferred to/from the blob store. |
openartifact_blob_deletions_pending | gauge | none | Blob copies queued for deletion (in their grace period, or held back by a running backup). |
openartifact_blob_deletions_swept_total | counter | result | Queued blob deletions the sweeper finished, by result: deleted (bytes removed) or kept (the blob was re-uploaded or the copy is authoritative again). |
openartifact_blob_downloads_total | counter | mode, reason | Blob download GET requests by delivery mode: mode=redirect (307 to a presigned URL) or mode=stream (served by this server); reason says why a download was streamed. |
openartifact_blob_operation_duration_seconds | histogram | operation, result | Blob store operation latency by operation (put, get, exists, exists_by_sha256, delete, size, metadata) and result (ok, error). |
Buckets of openartifact_blob_operation_duration_seconds: 0.0005, 0.001, 0.0025, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 10, 60.
Database connection pools
| Metric | Type | Labels | Help |
|---|---|---|---|
openartifact_db_pool_acquire_canceled_total | counter | pool | Acquisitions abandoned because the caller's context ended while waiting (pgx pool only). |
openartifact_db_pool_acquire_seconds_total | counter | pool | Cumulative time spent acquiring connections, including waits (pgx pool only). |
openartifact_db_pool_acquire_wait_seconds_total | counter | pool | Cumulative time acquisitions spent waiting for a connection. |
openartifact_db_pool_acquire_waits_total | counter | pool | Connection acquisitions that had to wait because every connection was in use. |
openartifact_db_pool_acquires_total | counter | pool | Successful connection acquisitions (pgx pool only; database/sql does not count them). |
openartifact_db_pool_connections | gauge | pool, state | Established database connections by state: in_use (checked out) or idle. |
openartifact_db_pool_connections_closed_total | counter | pool, reason | Connections closed by the pool, by reason: max_lifetime or max_idle (connection churn). |
openartifact_db_pool_connections_created_total | counter | pool | Connections the pool has opened (pgx pool only). |
openartifact_db_pool_max_connections | gauge | pool | Configured connection limit of the pool. |
openartifact_db_pool_open_connections | gauge | pool | Database connections that exist (in use, idle, and for the pgx pool those being opened). |
Federation
| Metric | Type | Labels | Help |
|---|---|---|---|
openartifact_federation_applied_total | counter | repo, peer, result | Log entries pulled from a peer, by result: applied, skipped (already up to date), deferred (set aside for retry) or failed. |
openartifact_federation_backlog_units | gauge | repo, peer | Log positions of a peer that have not been pulled yet. |
openartifact_federation_conflicts_total | counter | repo, peer | Local changes superseded by a different state of the same unit from a peer (last writer wins). |
openartifact_federation_lag_seconds | gauge | repo, peer | Age of the oldest change of a peer that has not been applied yet (0 when caught up). |
openartifact_federation_last_success_timestamp_seconds | gauge | repo, peer | Unix time of the last successful pull of a peer (0 when it never succeeded). |
openartifact_federation_partial_bytes | gauge | none | Bytes of interrupted blob downloads kept in the federation spool for resuming. |
openartifact_federation_pull_errors_total | counter | repo, peer | Pull attempts of a peer that ended in an error. |
openartifact_federation_resumed_total | counter | repo, peer | Blob transfers from a peer resumed with a Range request after the connection dropped (or from a partial download of an earlier pull). |
HTTP
| Metric | Type | Labels | Help |
|---|---|---|---|
openartifact_http_request_duration_seconds | histogram | method, path | HTTP request latency in seconds. |
openartifact_http_requests_total | counter | method, path, status | Total number of HTTP requests by method, route template (never the raw URL) and status. |
Buckets of openartifact_http_request_duration_seconds: 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10.
Metadata regeneration
| Metric | Type | Labels | Help |
|---|---|---|---|
openartifact_metadata_regeneration_duration_seconds | histogram | format | Wall-clock time of metadata regeneration cycles. |
openartifact_metadata_regenerations_total | counter | format | Total number of metadata regeneration cycles completed. |
Buckets of openartifact_metadata_regeneration_duration_seconds: 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10.
Disaster-recovery journal
| Metric | Type | Labels | Help |
|---|---|---|---|
openartifact_recovery_failures_total | counter | none | Journal operations that failed and will be retried with backoff. |
openartifact_recovery_journal_backlog | gauge | none | Changed rows waiting for their disaster-recovery sidecar to be written or deleted. |
openartifact_recovery_oldest_dirty_age_seconds | gauge | none | Age of the oldest changed row still waiting for its sidecar (0 when the journal is drained). |
openartifact_recovery_reconcile_marked_total | counter | none | Rows the journal reconcile marked dirty (rows without a sidecar, sidecars without a row). |
openartifact_recovery_sidecars_deleted_total | counter | none | Disaster-recovery sidecar blobs deleted (their row is gone, or a newer sidecar superseded them). |
openartifact_recovery_sidecars_written_total | counter | none | Disaster-recovery sidecar blobs written to the blob store. |
Blob replication
| Metric | Type | Labels | Help |
|---|---|---|---|
openartifact_replication_backlog | gauge | op | Blob replication operations waiting in the queue, by op (copy, delete). |
openartifact_replication_enqueue_failures_total | counter | none | Replication operations that could not be queued; the verify pass catches such blobs. |
openartifact_replication_failures_total | counter | op | Failed replication attempts (they are retried with backoff), by op. |
openartifact_replication_fallback_reads_total | counter | call | Reads answered by the replica because the primary could not, by call (get, size, exists, metadata). |
openartifact_replication_last_verify_timestamp_seconds | gauge | none | Unix time the last verify pass finished (0 = never). |
openartifact_replication_missing_primary_total | counter | none | Queued copies whose blob was not on the primary store. |
openartifact_replication_oldest_pending_age_seconds | gauge | none | Age of the oldest queued replication operation (the replication lag); 0 when the queue is empty. |
openartifact_replication_replicated_bytes_total | counter | none | Bytes copied to the replica. |
openartifact_replication_replicated_total | counter | none | Blobs copied to the replica. |
openartifact_replication_verify_checked_total | counter | none | Blobs examined by verify passes. |
openartifact_replication_verify_mismatched_total | counter | none | Blobs verify passes found with different sizes (or contents, with verifyDeep) on the two sides. |
openartifact_replication_verify_missing_total | counter | side | Blobs verify passes found missing, by side (replica, primary). |
openartifact_replication_verify_repaired_total | counter | side | Blobs verify passes and read repairs fixed, by side repaired (replica, primary). |
Vulnerability scanners
| Metric | Type | Labels | Help |
|---|---|---|---|
openartifact_scanner_db_last_success_timestamp_seconds | gauge | scanner | Unix time of the last successful vulnerability database refresh (or the database's age on disk after a restart), by scanner. |
openartifact_scanner_db_update_attempts_total | counter | scanner, result | Vulnerability database refreshes of the Trivy and Grype scanners, by scanner and result (success, failure). |
openartifact_scanner_install_attempts_total | counter | scanner, result | Runtime installs of the Trivy and Grype binaries, by scanner and result (installed, reused, unsupported_platform, download_failed, checksum_mismatch, extract_failed, noexec, insecure_location, failed). |
Storage tiering
| Metric | Type | Labels | Help |
|---|---|---|---|
openartifact_storage_tier_blobs | gauge | tier | Blobs placed on each storage tier, refreshed by the tier mover. |
openartifact_storage_tier_bytes | gauge | tier | Bytes of blobs placed on each storage tier, refreshed by the tier mover. |
openartifact_storage_tier_moved_bytes_total | counter | from, to | Bytes of blobs moved between storage tiers. |
openartifact_storage_tier_moves_pending | gauge | none | Tier moves left in the journal (interrupted or failed, awaiting recovery). |
openartifact_storage_tier_moves_total | counter | from, to, result | Blob moves between storage tiers by outcome (moved, failed, skipped). |
openartifact_storage_tier_reads_total | counter | tier | Blob reads served from each storage tier. |
Telemetry
| Metric | Type | Labels | Help |
|---|---|---|---|
openartifact_telemetry_log_records_dropped_total | counter | scope | Log records not exported over OTLP because the export queue was full (collector slow or unreachable), by instrumentation scope. |
Trash
| Metric | Type | Labels | Help |
|---|---|---|---|
openartifact_trash_purged_total | counter | kind | Total number of trashed items permanently removed by the retention purge, by kind. |
Uploads
| Metric | Type | Labels | Help |
|---|---|---|---|
openartifact_uploads_total | counter | format, result | Hosted upload requests by package format and result (success, error). |