Merge pull request #54 from poanetwork/ferigis.53.accept_more_metric_types

[#53] Accept more than one metric type
This commit is contained in:
Joseph Yiasemides 2018-08-23 16:24:06 +02:00 committed by GitHub
commit bf16c9b1af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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]