Skip to content

Commit

Permalink
fix: MetricCleaner need to fetch Peep TIDs instead of using table name
Browse files Browse the repository at this point in the history
  • Loading branch information
hauleth committed Jan 7, 2025
1 parent 5a728a2 commit d066560
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/supavisor/metrics_cleaner.ex
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ defmodule Supavisor.MetricsCleaner do
metrics_table = Supavisor.Monitoring.PromEx.Metrics
tenant_registry_table = :syn_registry_by_name_tenants

fn
func = fn
{{_,
%{
type: type,
Expand All @@ -61,6 +61,9 @@ defmodule Supavisor.MetricsCleaner do
_, acc ->
acc
end
|> :ets.foldl(nil, metrics_table)

{_, tids} = Peep.Persistent.storage(Supavisor.Monitoring.PromEx.Metrics)

Enum.each(List.wrap(tids), &:ets.foldl(func, nil, &1))
end
end

0 comments on commit d066560

Please sign in to comment.