Skip to content

Look into an API for finding ActiveSupport::Notifications subscribers #1437

Open
@kaylareopelle

Description

There's a decade-old TODO in our notifications_subscriber:

def self.find_all_subscribers
# TODO: need to talk to Rails core about an API for this,
# rather than digging through Listener ivars
instance_variable_names = [:@subscribers, :@string_subscribers, :@other_subscribers]
all_subscribers = []

Let's look into whether there is an API for finding all subscribers as an alternative to this approach. If there isn't one, consider:

  • Creating an issue for the Rails core team to address it
  • Submitting a PR to Rails that creates an API to access all subscribers

Remove the TODO when finished.

Whatever we come up with should be OTel-informed.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions