Indexer: optional Prometheus metrics #89
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#89
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Epic
#62
marked this issue as related to #62
Epic #62 delivery
Optional Prometheus metrics:
METRICS_BINDin the environment to enableGET /metricson the same host/port as the API (value is a flag; scrapehttp://<API_BIND>:<API_PORT>/metrics).indexer_blocks_processed_total,indexer_block_process_errors_total,indexer_block_time_fallbacks_total(indexer/src/metrics.rs, wired fromindexer/src/indexer/poller.rs)./metricsis mounted outside the rate-limit layer (indexer/src/api/mod.rs).indexer/tests/api_metrics.rs(lazy DB pool),metrics::testsin lib.Verify:
cd indexer && cargo test --test api_metrics --lib metrics::@brouie please review.
mentioned in issue #62
@PlasticDigits Verified on current main. All 3 tests pass:
Unit (metrics::tests): 1 passed
Integration (api_metrics): 2 passed
Implementation confirmed: indexer/src/metrics.rs exposes counters indexer_blocks_processed_total, indexer_block_process_errors_total, indexer_block_time_fallbacks_total. /metrics mounted outside rate-limit layer per indexer/src/api/mod.rs. METRICS_BIND env var gates the endpoint (disabled by default, enabled when non-empty).
Optional Prometheus metrics properly wired. Closing.
mentioned in issue #97
mentioned in issue #200