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

Add a telemetry event on connect/disconnect #310

Closed
wants to merge 4 commits into from

Conversation

v0idpwn
Copy link
Member

@v0idpwn v0idpwn commented Jun 23, 2024

This PR also moves the logic of notifying listeners to a telemetry handler.

Pros:

  • We get telemetry events, which are more powerful than connection listeners, and more "standard" in the ecosystem.

Cons:

  • The logic to support the listeners on top of the telemetry events is a bit ugly
  • Two ways of doing the same thing.

I'm not sure if we should merge this. The purpose of the PR is to demonstrate how it could be done.

Copy link
Member

@josevalim josevalim left a comment

Choose a reason for hiding this comment

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

Thanks but I think prefer the opposite route. Listeners are free, telemetry has a tiny cost. Can we have a built in listeners that pushes telemetry events?

@v0idpwn
Copy link
Member Author

v0idpwn commented Jun 23, 2024

Sounds good, will send another PR with the alternative approach :)

@v0idpwn
Copy link
Member Author

v0idpwn commented Jun 27, 2024

Closing this in favor of #311

@v0idpwn v0idpwn closed this Jun 27, 2024
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