Skip to content

feat(metrics): expose Clio version as build info - #3306

Open
hehuanlu wants to merge 1 commit into
XRPLF:developfrom
hehuanlu:feat/clio-build-info-metric
Open

hehuanlu wants to merge 1 commit into
XRPLF:developfrom
hehuanlu:feat/clio-build-info-metric

Conversation

@hehuanlu

Copy link
Copy Markdown

Summary

Expose the running Clio version in the Prometheus endpoint as clio_build_info{version="..."} 1. This addresses #3224 and lets operators verify the version on each instance during rolling upgrades.

Implementation

Register a constant gauge immediately after the Prometheus service is initialized on the server run path. The version label uses the same build version source as server_info and the HTTP Server header. The metric follows the existing prometheus.enabled setting and /metrics admin access control.

Verification

  • git diff --check passed.
  • Reviewed the metric's registration and serialization path: gaugeInt emits a gauge with the escaped version label and value 1 through the existing /metrics handler.
  • A full Conan/CMake build and runtime metrics smoke test are still required before submission; this checkout has insufficient free disk space to build Clio.

Fixes #3224

Signed-off-by: hehuanlu <hehuanlu@outlook.com>
@codecov

codecov Bot commented Nov 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/main/Main.cpp 0.00% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose Clio version as a Prometheus build info metric (Version: 2.7.1)

1 participant