-
Notifications
You must be signed in to change notification settings - Fork 48
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: add startup time metrics #108
Conversation
66eba87
to
aba3709
Compare
7d39d0d
to
bac6bda
Compare
lndmon is now tolerant of LND not being unlocked yet. |
bac6bda
to
373684e
Compare
662e605
to
ca3c37f
Compare
@djkazic, remember to re-request review from reviewers when ready |
Will address comments tomorrow 👍🏻 but yep I can defo refactor |
ca3c37f
to
a7d400b
Compare
a7d400b
to
5544239
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🧿
func (s *StateCollector) monitorStateChanges() { | ||
var serverActiveReached bool | ||
|
||
stateUpdates, errChan, err := s.lnd.State.SubscribeState(context.Background()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Today we don't track LND startup time. This modification records a start and end time for state transitions from RPC_ACTIVE to SERVER_ACTIVE (the bulk of startup time), then makes a prometheus gauge metric which will get picked up on the next scrape.
Edit: it would probably be helpful to make lndmon itself state-aware and not try to do any other scrapes until we see SERVER_ACTIVE.