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

Prevent sending key count when 0. #81

Merged
merged 1 commit into from
Apr 22, 2022

Conversation

qustavo
Copy link
Contributor

@qustavo qustavo commented Apr 22, 2022

Since the introduction of
lightningnetwork/lnd@afc53d1,
lnd will create 255 new wallets. Those might never be used but metrics
are being sent, polluting the metric space.

This PR only send metrics when keycount is > 0 on both internal and
external branches.

Copy link
Member

@guggero guggero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix, definitely makes sense!
Just one nit/question, otherwise looks good to me.

collectors/wallet_collector.go Outdated Show resolved Hide resolved
Since the introduction of
lightningnetwork/lnd@afc53d1,
lnd will create 255 new wallets. Those might never be used but metrics
are being sent, polluting the metric space.

This PR only send metrics when keycount is > 0 on both internal and
external branches.
Copy link

@positiveblue positiveblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK, better send metrics only for the wallets that are used 👍

@guggero guggero merged commit 082846f into lightninglabs:master Apr 22, 2022
@qustavo qustavo deleted the empty_keycount branch April 26, 2022 08:02
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.

None yet

3 participants