Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add beam-dashboards integration #902

Merged
merged 6 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ config :phoenix, :json_library, Jason
# Configures the phoenix endpoint
config :lambda_ethereum_consensus, BeaconApi.Endpoint,
http: [port: 4000],
server: true,
url: [host: "localhost"],
render_errors: [
formats: [json: BeaconApi.ErrorJSON],
Expand Down
1 change: 1 addition & 0 deletions lib/beacon_api/endpoint.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ defmodule BeaconApi.Endpoint do
json_decoder: Phoenix.json_library()
)

plug(BeaconApi.MetricsExporter)
plug(BeaconApi.Router)
plug(Sentry.PlugContext)
end
4 changes: 4 additions & 0 deletions lib/beacon_api/metrics_exporter.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
defmodule BeaconApi.MetricsExporter do
@moduledoc false
use Prometheus.PlugExporter
end
1 change: 1 addition & 0 deletions lib/lambda_ethereum_consensus/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ defmodule LambdaEthereumConsensus.Application do

@impl true
def start(_type, _args) do
BeaconApi.MetricsExporter.setup()
# Configure sentry logger handler
Logger.add_handlers(:lambda_ethereum_consensus)
mode = get_operation_mode()
Expand Down
Loading
Loading