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 notification hooks for connection events #36113

Closed

Conversation

sponomarev
Copy link
Contributor

In comparison to channels, the application-specific code doesn't have any way to instrument it yet. At the moment, if we want to measure performance, instrument connection code with APM or gather any connect/disconnect statistics, it can only be done on the application code level or monkeypatching framework classes.

connect.action_cable and disconnect.action_cable notifications were added in order to address the issue.

Event payload consists of:
connection_class – name of the connection class since we can support multiple since #34714
request – the request that initiated the WebSocket connection. It provides access to the environment, cookies, etc.

`connect.action_cable` and `disconnect.action_cable` notifications are added.
They can be used to instrument application-specific code performed during connect/disconnect.
@sponomarev
Copy link
Contributor Author

Is there anything here which should be considered?

@rails-bot
Copy link

rails-bot bot commented Dec 17, 2019

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Thank you for your contributions.

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

Successfully merging this pull request may close these issues.

None yet

1 participant