-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
1 parent
749bfed
commit 5a6dc03
Showing
4 changed files
with
42 additions
and
13 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
defmodule Plausible.PromEx.StripedPeep do | ||
@moduledoc """ | ||
"Striped" storage based on `PromEx.Storage.Peep`. | ||
""" | ||
|
||
@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 child_spec(name, metrics) do | ||
opts = [ | ||
name: name, | ||
metrics: metrics, | ||
storage: :striped | ||
] | ||
|
||
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
Oops, something went wrong.