diff --git a/lib/prom_ex.ex b/lib/prom_ex.ex index 63648a2..8665f63 100644 --- a/lib/prom_ex.ex +++ b/lib/prom_ex.ex @@ -62,8 +62,7 @@ defmodule PromEx do 1. [TelemetryMetricsPrometheus.Core](https://github.com/beam-telemetry/telemetry_metrics_prometheus_core) - This is the default adapter and is included with PromEx. - 2. [Peep](https://github.com/rkallos/peep) - In order to use Peep as your storage adapter, you need to add `:peep` - to your list of dependencies like so: `{:peep, "~> 3.2"}`. After running `mix deps.get` you will need to add the following + 2. [Peep](https://github.com/rkallos/peep) - In order to use Peep as your storage adapter, you will need to add the following to your `config.exs` file: ```elixir diff --git a/lib/prom_ex/storage/peep.ex b/lib/prom_ex/storage/peep.ex index 969fd94..52462c8 100644 --- a/lib/prom_ex/storage/peep.ex +++ b/lib/prom_ex/storage/peep.ex @@ -1,27 +1,25 @@ -if Code.ensure_loaded?(Peep) do - defmodule PromEx.Storage.Peep do - @moduledoc """ - This store uses [Peep](https://github.com/rkallos/peep) as the storage - mechanism for metrics. - """ +defmodule PromEx.Storage.Peep do + @moduledoc """ + This store uses [Peep](https://github.com/rkallos/peep) as the storage + mechanism for metrics. + """ - @behaviour PromEx.Storage + @behaviour PromEx.Storage - @impl true - def scrape(name) do - Peep.get_all_metrics(name) - |> Peep.Prometheus.export() - |> IO.iodata_to_binary() - end + @impl true + def scrape(name) do + Peep.get_all_metrics(name) + |> Peep.Prometheus.export() + |> IO.iodata_to_binary() + end - @impl true - def child_spec(name, metrics) do - opts = [ - name: name, - metrics: metrics - ] + @impl true + def child_spec(name, metrics) do + opts = [ + name: name, + metrics: metrics + ] - Peep.child_spec(opts) - end + Peep.child_spec(opts) end end diff --git a/mix.exs b/mix.exs index 7597ed9..e3c6b0b 100644 --- a/mix.exs +++ b/mix.exs @@ -61,7 +61,7 @@ defmodule PromEx.MixProject do {:telemetry_poller, "~> 1.1"}, {:telemetry_metrics, "~> 1.0"}, {:telemetry_metrics_prometheus_core, "~> 1.2"}, - {:peep, "~> 2.0 or ~> 3.0", optional: true}, + {:peep, "~> 3.0"}, {:plug_cowboy, ">= 2.6.0"}, {:octo_fetch, "~> 0.4"},