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

collectors: collect payment and attempt counts #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

calvinrzachman
Copy link

@calvinrzachman calvinrzachman commented Feb 26, 2025

Add support for real time tracking of counters for payments and attempts. These can be used to compute and create visualizations for things like average payment throughput and average # of attempts per payment.

rate(lnd_total_payments[5m])
rate(lnd_total_htlc_attempts[30m]) / rate(lnd_total_payments[30m])
  • The information is obtained in real time from lnd using the TrackPayments RPC.

After making payments between two directly connected nodes:

alice-64db66cb64-g4sh2:/# curl -s http://localhost:8990/metrics | grep lnd_total
# HELP lnd_total_htlc_attempts Total number of HTLC attempts across all payments
# TYPE lnd_total_htlc_attempts counter
lnd_total_htlc_attempts 5
# HELP lnd_total_payments Total number of payments initiated
# TYPE lnd_total_payments counter
lnd_total_payments 5

collect raw payment and attempt count information from
lnd using the TrackPayments RPC.
@calvinrzachman
Copy link
Author

I may be able to consolidate the # attempts with the existing HTLC collector. Checking...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants