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

Refactor unsubscribe logic to avoid unsubscribing other listeners #190

Merged

Conversation

rpbaltazar
Copy link
Contributor

Resolves #189

@rpbaltazar rpbaltazar force-pushed the remove-unsubscribe-activesupport-notifications branch from fe5ae63 to c4f6a84 Compare February 5, 2022 22:51
@rpbaltazar
Copy link
Contributor Author

@kaylareopelle please take a look at this PR and help me check if this does not impact your gem's implementation. I've tried to follow a similar approach used by lograge to unsubscribe specific event listener

@rpbaltazar
Copy link
Contributor Author

I have looked through the new_relic's gem source code and I don't think you're relying anyhow on ActiveRecord::LogSubscriber specifically, so I think this is a safe solution to push forward. Please re-open the ticket if that is not the case.

@rpbaltazar rpbaltazar merged commit 1c6311f into development Feb 7, 2022
@rpbaltazar rpbaltazar deleted the remove-unsubscribe-activesupport-notifications branch February 7, 2022 11:36
@kaylareopelle
Copy link

@rpbaltazar - Thank you for this fix! It looks like it should avoid the issues we were previously seeing with the agent. My apologies for the lack of response over the weekend! I'll share this with a customer that raised the conflict and let you know how it goes.

@rpbaltazar
Copy link
Contributor Author

No problem. My time available for OSS varies a lot throughout the year, thus trying to power through a few issues once i have time avail. Thank you for this! 🔥

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.

Remove ActiveSupport::Notifications#unsubscribe
2 participants