-
Notifications
You must be signed in to change notification settings - Fork 247
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
Add infrastructure for Subspace networking metrics. #2284
Conversation
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.
I don't think I fully understand why we need external and internal metrics separation. In fact I'm not sure why those are even exposed as networking types, I would have expected optional Registry
to be provided as a construction argument for networking to register whatever metrics it needs just like it is with libp2p itself.
And I'd like to emphasize that none of this is about networking metrics, we need more farmer and other metrics too, so changes should be done with that in mind.
AFAIK, the For example, we could invert the dependencies and return |
Yes, you send
This is backwards if we are talking about generic metrics that networking contributes to rather than networking metrics that others are using by accident. We can wrap |
It makes sense. I misunderstood you then. I think the |
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.
Functionality-wise looks fine, some suggestions for renaming/refactoring.
crates/subspace-farmer/src/bin/subspace-farmer/commands/farm/dsn.rs
Outdated
Show resolved
Hide resolved
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.
I'll squash-merge once CI passes
This PR adds the infrastructure code for custom DSN metrics. It follows a discussion from this PR: #2280
The PR exports a single metric (established connections) for demo purposes.
Code contributor checklist: