Metrics reference¶
Hangar exports these metrics over OTLP, or on /metrics when telemetry.metrics is prometheus. HTTP server and client metrics follow the OpenTelemetry semantic conventions (http.server.request.duration, http.server.active_requests and the body size histograms), and Go runtime metrics come from the runtime instrumentation. Repo IDs are never metric attributes; they are on spans and logs.
Gauges that need a database count are computed by one worker at a time every 60 seconds.
| Metric | Prometheus name | Type | Unit | Attributes | Description |
|---|---|---|---|---|---|
hangar.download.bytes |
hangar_download_bytes_total |
counter | By |
protocol, mode (redirect, proxy), repo.type |
Bytes downloaded by clients. |
hangar.download.files |
hangar_download_files_total |
counter | {file} |
protocol, repo.type |
Files downloaded by clients. |
hangar.upload.bytes |
hangar_upload_bytes_total |
counter | By |
protocol |
Bytes uploaded by clients. |
hangar.pull.bytes |
hangar_pull_bytes_total |
counter | By |
upstream |
Bytes transferred from Upstreams by Pulls. |
hangar.pull.rate_limited.duration |
hangar_pull_rate_limited_duration_seconds_total |
counter | s |
upstream |
Time Pulls spent waiting for the bandwidth limit. |
hangar.pull.files |
hangar_pull_files_total |
counter | {file} |
upstream, outcome (ok, retry, failed, deduplicated) |
Files transferred by Pulls, by outcome. |
hangar.jobs.queued |
hangar_jobs_queued |
gauge | {job} |
kind, status |
Jobs by kind and status. |
hangar.jobs.duration |
hangar_jobs_duration_seconds |
histogram | s |
kind, outcome |
Job run time, by kind and outcome. |
hangar.jobs.lease.expired |
hangar_jobs_lease_expired_total |
counter | {job} |
kind |
Jobs whose lease expired and went back to the queue. |
hangar.git.push |
hangar_git_push_total |
counter | {push} |
outcome (ok, rejected, conflict, error) |
git pushes, by outcome. |
hangar.git.pack.duration |
hangar_git_pack_duration_seconds |
histogram | s |
service (upload-pack, receive-pack) |
git pack generation and receive time. |
hangar.git.cache.requests |
hangar_git_cache_requests_total |
counter | {request} |
outcome (hit, miss) |
Local pack cache lookups, by outcome. |
hangar.git.cache.bytes |
hangar_git_cache_bytes |
gauge | By |
- | Size of the local pack cache. |
hangar.git.packs |
hangar_git_packs |
gauge | {pack} |
state |
git packs by state, reported by compaction runs. |
hangar.xet.xorbs |
hangar_xet_xorbs_total |
counter | {xorb} |
outcome (inserted, existing, rejected) |
Xet xorb uploads, by outcome. |
hangar.xet.reassembly.duration |
hangar_xet_reassembly_duration_seconds |
histogram | s |
outcome |
Time to reassemble Xet uploads into LFS objects. |
hangar.xet.reassembly.bytes |
hangar_xet_reassembly_bytes_total |
counter | By |
- | Bytes reassembled from Xet uploads. |
hangar.blob.operation.duration |
hangar_blob_operation_duration_seconds |
histogram | s |
backend, operation, outcome |
Blob store operation time. |
hangar.storage.bytes |
hangar_storage_bytes |
gauge | By |
kind (lfs, git) |
Stored bytes by kind, reported by GC runs. |
hangar.repos |
hangar_repos |
gauge | {repo} |
type, visibility, mirror |
Repos by type, visibility and Mirror state. |
hangar.users |
hangar_users |
gauge | {user} |
- | Users. |
hangar.auth.attempts |
hangar_auth_attempts_total |
counter | {attempt} |
method (password, oidc, token, ollama_key), outcome |
Authentication attempts, by method and outcome. |
hangar.webhook.deliveries |
hangar_webhook_deliveries_total |
counter | {delivery} |
outcome |
Webhook deliveries, by outcome. |
hangar.index.duration |
hangar_index_duration_seconds |
histogram | s |
outcome |
Index run time, by outcome. |
hangar.scan.files |
hangar_scan_files_total |
counter | {file} |
status |
Scanned files, by status. |