# HG changeset patch # User Alain Mazy # Date 1792503630 -7200 # Node ID 2c0758ba1ab68ed16d60f67345beb15021e73ef3 # Parent 745b6573db7145957d4c223a157f39968267c9cf Fix uncompressed size in Prometheus metrics diff -r 745b6573db71 -r 2c0758ba1ab6 NEWS --- a/NEWS Tue Oct 20 09:51:09 2026 +0200 +++ b/NEWS Tue Oct 20 15:40:30 2026 +0200 @@ -42,6 +42,8 @@ * Reduced the number of SQL queries when accessing /instances/../tags * Fixed performance regression when a plugin is accessing only the DICOM tags of a file (https://discourse.orthanc-server.org/t/1-13-0-orthancpluginloaddicominstance-reads-the-whole-dicom-file-in-emptypixeldata-and-untilpixeldata-modes/6489) +* Fix uncompressed size in Prometheus metrics + (https://discourse.orthanc-server.org/t/fixing-prometheus-metrics-contribution/6490) * Fix use of the static runtime under Visual Studio (/MT), which broke in 1.12.10 * New CMake options: - "THIRD_PARTY_DOWNLOADS_ROOT_URL" to specify another webserver to downloads the third-parties from. diff -r 745b6573db71 -r 2c0758ba1ab6 OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp --- a/OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp Tue Oct 20 09:51:09 2026 +0200 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp Tue Oct 20 15:40:30 2026 +0200 @@ -1032,7 +1032,7 @@ MetricsRegistry& registry = context.GetMetricsRegistry(); registry.SetFloatValue("orthanc_disk_size_mb", static_cast(diskSize) / MEGABYTE); - registry.SetFloatValue("orthanc_uncompressed_size_mb", static_cast(diskSize) / MEGABYTE); + registry.SetFloatValue("orthanc_uncompressed_size_mb", static_cast(uncompressedSize) / MEGABYTE); registry.SetIntegerValue("orthanc_count_patients", static_cast(countPatients)); registry.SetIntegerValue("orthanc_count_studies", static_cast(countStudies)); registry.SetIntegerValue("orthanc_count_series", static_cast(countSeries));