Merge pull request #54 from poanetwork/ferigis.53.accept_more_metric_types
[#53] Accept more than one metric type
This commit is contained in:
commit
bf16c9b1af
|
@ -34,7 +34,8 @@ config :poa_backend,
|
|||
config :poa_backend,
|
||||
:metrics,
|
||||
[
|
||||
:ethereum_metrics
|
||||
:ethereum_metrics,
|
||||
:networking_metrics
|
||||
]
|
||||
|
||||
# here we have to define the relationship between receivers and metric types. The format is {receiver_id, [metric_type]}.
|
||||
|
@ -42,7 +43,7 @@ config :poa_backend,
|
|||
config :poa_backend,
|
||||
:subscriptions,
|
||||
[
|
||||
{:dashboard_receiver, [:ethereum_metrics]}
|
||||
{:dashboard_receiver, [:ethereum_metrics, :networking_metrics]}
|
||||
]
|
||||
|
||||
# here we define the configuration for the Authorisation endpoint
|
||||
|
|
|
@ -12,7 +12,7 @@ defmodule POABackend.Metrics.Supervisor do
|
|||
metrics = Application.get_env(:poa_backend, :metrics)
|
||||
|
||||
children = for metric <- metrics do
|
||||
worker(POABackend.Metric, [metric])
|
||||
worker(POABackend.Metric, [metric], id: metric)
|
||||
end
|
||||
|
||||
opts = [strategy: :one_for_one]
|
||||
|
|
Loading…
Reference in New Issue