Skip to content

Conversation

@tisba
Copy link
Contributor

@tisba tisba commented Mar 4, 2024

ActiveSupport::Notifications.subscribe's block arguments are as follows (taken from the Rails API docs):

ActiveSupport::Notifications.subscribe('render') do |name, start, finish, id, payload|
  name    # => String, name of the event (such as 'render' from above)
  start   # => Time, when the instrumented block started execution
  finish  # => Time, when the instrumented block ended execution
  id      # => String, unique ID for the instrumenter that fired the event
  payload # => Hash, the payload
end

The README makes it look like the id argument would be the request ID, which is not the case.

@santib
Copy link
Collaborator

santib commented Mar 10, 2024

Good catch, thank you!

@santib santib merged commit d7a7a8b into rack:main Mar 10, 2024
@tisba tisba deleted the patch-1 branch March 11, 2024 06:55
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