Track total assets cache size in Live Dashboard

This commit is contained in:
Claudio Ortolina
2025-09-20 08:24:15 +03:00
parent a1b5842148
commit 68a2159d7d
2 changed files with 12 additions and 0 deletions
+4
View File
@@ -115,6 +115,9 @@ defmodule MusicLibraryWeb.Telemetry do
]
),
# Assets
summary("music_library.assets.cache.total_content_size", unit: {:byte, :kilobyte}),
# VM Metrics
summary("vm.memory.total", unit: {:byte, :megabyte}),
summary("vm.total_run_queue_lengths.total"),
@@ -125,6 +128,7 @@ defmodule MusicLibraryWeb.Telemetry do
defp periodic_measurements do
[
{MusicLibrary.Assets.Cache, :track_total_content_size, []}
# A module, function and arguments to be invoked periodically.
# This function must call :telemetry.execute/3 and a metric must be added above.
# {MusicLibraryWeb, :count_users, []}