Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use Peep for metrics gathering #494

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ config :supavisor,
reconnect_retries: System.get_env("RECONNECT_RETRIES", "5") |> String.to_integer(),
subscribe_retries: System.get_env("SUBSCRIBE_RETRIES", "20") |> String.to_integer()

config :prom_ex, storage_adapter: PromEx.Storage.Peep

# Configures the endpoint
config :supavisor, SupavisorWeb.Endpoint,
url: [host: "localhost"],
Expand Down
2 changes: 1 addition & 1 deletion lib/supavisor/monitoring/prom_ex.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule Supavisor.Monitoring.PromEx do
and provides a function to remove remote metrics associated with a specific tenant.
"""

use PromEx, otp_app: :supavisor, store: PromEx.Storage.Peep
use PromEx, otp_app: :supavisor
require Logger

alias PromEx.Plugins
Expand Down
4 changes: 0 additions & 4 deletions lib/supavisor/monitoring/tenant.ex
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ defmodule Supavisor.PromEx.Plugins.Tenant do
tags: @tags,
unit: {:native, :millisecond},
reporter_options: [
buckets: [1, 5, 10, 100, 1_000, 5_000, 10_000],
peep_bucket_calculator: Buckets
]
),
Expand All @@ -56,7 +55,6 @@ defmodule Supavisor.PromEx.Plugins.Tenant do
tags: @tags,
unit: {:native, :millisecond},
reporter_options: [
buckets: [1, 5, 10, 100, 1_000, 5_000, 10_000],
peep_bucket_calculator: Buckets
]
),
Expand All @@ -68,7 +66,6 @@ defmodule Supavisor.PromEx.Plugins.Tenant do
tags: @tags,
unit: {:native, :millisecond},
reporter_options: [
buckets: [1, 5, 10, 100, 1_000, 5_000, 10_000],
peep_bucket_calculator: Buckets
]
),
Expand All @@ -80,7 +77,6 @@ defmodule Supavisor.PromEx.Plugins.Tenant do
tags: @tags,
unit: {:native, :millisecond},
reporter_options: [
buckets: [1, 5, 10, 100, 1_000, 5_000, 10_000],
peep_bucket_calculator: Buckets
]
),
Expand Down
Loading