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(core): add metrics/observability with prometheus #1518

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

fborello-lambda
Copy link
Contributor

@fborello-lambda fborello-lambda commented Dec 16, 2024

Motivation

We need a starting point to create dashboards with Grafana. Metrics are essential to observe the behavior of the node.

Description

  • Simple dashboard with a counter. Counts the transactions.

    • We neeed an API with the /metrics endpoint → using axum for fast development, we may want to create a simple API from scratch without any crate.
  • To test it out:

  1. cd crates/l2 && cp .env.example .env
  2. make rm_db_l2 && make init
  • In a new terminal:
  1. make cli
  2. ethrex_l2 test load --path <full_path>/ethrex/test_data/private_keys.txt -i 1
  • In the browser go to http://localhost:3802/:
    • Login with admin/admin
    • Go to Dashboards → open the Ethrex - Transactions dashboard, the dashboard should show 172. The previous cli's command sent 172 transactions.

Example output:

image

Closes #1429

@fborello-lambda fborello-lambda self-assigned this Dec 16, 2024
@fborello-lambda fborello-lambda marked this pull request as ready for review December 17, 2024 20:47
@fborello-lambda fborello-lambda requested a review from a team as a code owner December 17, 2024 20:47
cmd/ethrex/ethrex.rs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prometheus and Grafana support
2 participants