Update prometheus metric name

This commit is contained in:
Eugene Burmakin 2025-02-11 21:17:33 +01:00
parent 7e5440205e
commit 5b2834599e
3 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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
}

View file

@ -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
}
)