diff --git a/CHANGELOG.md b/CHANGELOG.md index 269617f7..76df144a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,9 +19,9 @@ To set a custom tile URL, go to the user settings and set the `Maps` section to - If you have Prometheus exporter enabled, you can now see a `ruby_dawarich_map_tiles` metric in Prometheus, which shows the total number of map tiles loaded. Example: ``` -# HELP ruby_dawarich_map_tiles -# TYPE ruby_dawarich_map_tiles gauge -ruby_dawarich_map_tiles 99 +# HELP ruby_dawarich_map_tiles_usage +# TYPE ruby_dawarich_map_tiles_usage counter +ruby_dawarich_map_tiles_usage 99 ``` # 0.24.0 - 2025-02-10 diff --git a/app/services/maps/tile_usage/track.rb b/app/services/maps/tile_usage/track.rb index 13fd1711..0affd754 100644 --- a/app/services/maps/tile_usage/track.rb +++ b/app/services/maps/tile_usage/track.rb @@ -8,7 +8,7 @@ class Maps::TileUsage::Track def call metric_data = { type: 'counter', - name: 'dawarich_map_tiles', + name: 'dawarich_map_tiles_usage', value: @count } diff --git a/spec/services/maps/tile_usage/track_spec.rb b/spec/services/maps/tile_usage/track_spec.rb index 82f0360c..896810eb 100644 --- a/spec/services/maps/tile_usage/track_spec.rb +++ b/spec/services/maps/tile_usage/track_spec.rb @@ -18,7 +18,7 @@ RSpec.describe Maps::TileUsage::Track do expect(prometheus_client).to receive(:send_json).with( { type: 'counter', - name: 'dawarich_map_tiles', + name: 'dawarich_map_tiles_usage', value: tile_count } )