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

Only update delta in subscribe2 #347

Merged
merged 2 commits into from
Jan 24, 2024
Merged

Only update delta in subscribe2 #347

merged 2 commits into from
Jan 24, 2024

Conversation

neekolas
Copy link
Collaborator

@neekolas neekolas commented Jan 24, 2024

Summary

In Subscribe2 we allow a client to update their subscription by passing an updated list of the topics they are interested in. The subscription metrics were incrementing the total subs by the length of the list instead of the delta between the old and new, causing our subscriptions metric to inflate.

Notes

One caveat to this approach is that we only set the xmtp_subscribe_topics_length based on the original request, not any updates. That seems better than observing a new metric every time the subscription changes by 1.

@neekolas neekolas requested a review from snormore January 24, 2024 17:50
@neekolas neekolas marked this pull request as ready for review January 24, 2024 17:50
@neekolas neekolas merged commit 3ab997a into main Jan 24, 2024
3 checks passed
@neekolas neekolas deleted the nm/fix-subscribe2-metrics branch January 24, 2024 18:01
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