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

Overhaul stats: Allow multiple events listeners (subscribers to events) #1385

Closed
josecelano opened this issue Mar 18, 2025 · 1 comment
Closed
Assignees
Labels
- Developer - Torrust Improvement Experience Code Cleanup / Refactoring Tidying and Making Neat EPIC Contains several subissues

Comments

@josecelano
Copy link
Member

josecelano commented Mar 18, 2025

Relates to: #1341 (comment)

In order to start collecting metrics per socket address (segregate metrics per tracker service running on a different socket) we need to add more than one listener. There will be one listener per service that will update the metrics for that service.

Right now, the "factory" stats function creates both the event sender and the listener. We need to be able to:

  • Create one sender that can be shared.
  • Be able to create many listeners (subscribe listeners to events). One listener per socket.

For the time being we will keep the logic inside the statistics module. However, after finishing the overhaul of the stats we will decouple events from stats. In the future events might be used for other purposes, not only collecting metrics.

cc @da2ce7

@josecelano josecelano added - Developer - Torrust Improvement Experience Code Cleanup / Refactoring Tidying and Making Neat labels Mar 18, 2025
@josecelano josecelano self-assigned this Mar 18, 2025
@josecelano josecelano changed the title Overhaul stats: allow multiple events listeners (subscribers to events) Overhaul stats: Allow multiple events listeners (subscribers to events) Mar 18, 2025
@josecelano josecelano added the EPIC Contains several subissues label Mar 18, 2025
@josecelano
Copy link
Member Author

All sub-issues implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- Developer - Torrust Improvement Experience Code Cleanup / Refactoring Tidying and Making Neat EPIC Contains several subissues
Projects
None yet
Development

No branches or pull requests

1 participant