feat(observability): Prometheus /metrics endpoint with tracing bridge (STR-2557)#1516
Draft
feat(observability): Prometheus /metrics endpoint with tracing bridge (STR-2557)#1516
Conversation
…2557) Use the `metrics` crate (same facade Reth uses) with `metrics-exporter-prometheus` for the HTTP endpoint. For alpen-client: domain gauges automatically appear on Reth's built-in --metrics endpoint alongside EVM/P2P metrics. For strata binary: metrics-exporter-prometheus serves /metrics on configurable logging.metrics_port. Chain progress gauges: - alpen_l1_tip_height: ASM worker anchor block height - alpen_l2_sync_tip_slot: L2 sync worker tip slot - alpen_l2_finalized_slot: last finalized L2 slot - alpen_ol_tip_slot: OL fork-choice best block slot Tracing-to-metrics bridge: - MetricsLayer captures span busy/idle timing as histograms (alpen_span_busy_seconds / alpen_span_idle_seconds) so they flow to Prometheus instead of only being visible in Loki logs DB metrics: - alpen_db_transaction_duration_seconds histogram for sled transactions, independent of log level
2c021ac to
08c0bd8
Compare
Contributor
|
Commit: 4513b72 SP1 Execution Results
|
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #1516 +/- ##
==========================================
- Coverage 75.24% 65.55% -9.69%
==========================================
Files 800 801 +1
Lines 74882 75671 +789
==========================================
- Hits 56342 49608 -6734
- Misses 18540 26063 +7523
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 245 files with indirect coverage changes 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Prometheus metrics support using the
metricscrate (same facade Reth uses).alpen_l1_tip_height,alpen_l2_sync_tip_slot,alpen_l2_finalized_slot,alpen_ol_tip_slotMetricsLayercaptures span busy/idle timing asalpen_span_busy_seconds/alpen_span_idle_secondshistograms — flows to Prometheus instead of only Lokialpen_db_transaction_duration_secondsfor sled transactions (independent of log level)stratabinary:metrics-exporter-prometheusserves/metricson configurablelogging.metrics_portalpen-client: our gauges automatically appear on Reth's built-in--metricsendpointAll calls are no-ops when no recorder is installed.
STR-2557