|
|
|
@ -5,6 +5,7 @@ defmodule BlockScoutWeb.Application do |
|
|
|
|
|
|
|
|
|
use Application |
|
|
|
|
|
|
|
|
|
alias BlockScoutWeb.API.APILogger |
|
|
|
|
alias BlockScoutWeb.Counters.BlocksIndexedCounter |
|
|
|
|
alias BlockScoutWeb.{Endpoint, Prometheus} |
|
|
|
|
alias BlockScoutWeb.RealtimeEventHandler |
|
|
|
@ -15,6 +16,18 @@ defmodule BlockScoutWeb.Application do |
|
|
|
|
Prometheus.Instrumenter.setup() |
|
|
|
|
Prometheus.Exporter.setup() |
|
|
|
|
|
|
|
|
|
APILogger.message( |
|
|
|
|
"Current global API rate limit #{inspect(Application.get_env(:block_scout_web, :api_rate_limit)[:global_limit])} reqs/sec" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
APILogger.message( |
|
|
|
|
"Current API rate limit by key #{inspect(Application.get_env(:block_scout_web, :api_rate_limit)[:limit_by_key])} reqs/sec" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
APILogger.message( |
|
|
|
|
"Current API rate limit by IP #{inspect(Application.get_env(:block_scout_web, :api_rate_limit)[:limit_by_ip])} reqs/sec" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
# Define workers and child supervisors to be supervised |
|
|
|
|
children = [ |
|
|
|
|
# Start the endpoint when the application starts |
|
|
|
|