-
-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
21 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters