Skip to content

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

Description

@josecelano

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions