-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Enhancement] Add Prometheus support (#556)
* Added prometheus to deps list * WIP - screwing around with Prometheus and grafana * Added basic prometheus config * Updated docs in prom_ex module * Updated README
- Loading branch information
1 parent
8a40d29
commit fb27988
Showing
9 changed files
with
83 additions
and
23 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
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
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,40 @@ | ||
defmodule Pinchflat.PromEx do | ||
@moduledoc """ | ||
Configuration for the PromEx library which provides Prometheus metrics | ||
""" | ||
|
||
use PromEx, otp_app: :pinchflat | ||
|
||
alias PromEx.Plugins | ||
|
||
@impl true | ||
def plugins do | ||
[ | ||
Plugins.Application, | ||
Plugins.Beam, | ||
{Plugins.Phoenix, router: PinchflatWeb.Router, endpoint: PinchflatWeb.Endpoint}, | ||
Plugins.Ecto, | ||
Plugins.Oban, | ||
Plugins.PhoenixLiveView | ||
] | ||
end | ||
|
||
@impl true | ||
def dashboard_assigns do | ||
[ | ||
default_selected_interval: "30s" | ||
] | ||
end | ||
|
||
@impl true | ||
def dashboards do | ||
[ | ||
{:prom_ex, "application.json"}, | ||
{:prom_ex, "beam.json"}, | ||
{:prom_ex, "phoenix.json"}, | ||
{:prom_ex, "ecto.json"}, | ||
{:prom_ex, "oban.json"}, | ||
{:prom_ex, "phoenix_live_view.json"} | ||
] | ||
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
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.