hanami / events

[Experimental] Events framework for Hanami
MIT License
43 stars 7 forks source link

Idea: Instrumenters as in rails notification #81

Closed davydovanton closed 5 years ago

davydovanton commented 5 years ago

I found Instrumenters from rails guides

ActiveSupport::Notifications.instrument('render', extra: :information) do
  render plain: 'Foo'
end
# send event 'render' after block call

And that's why I have a question: should we create something like this? I think it will be great for monitoring. Or we can create hanami-monitoring library (like in dry) and make this repository clear. WDYT?

davydovanton commented 5 years ago

cc @jodosha

jodosha commented 5 years ago

@davydovanton Sorry if I'm late to comment this, but we already discussed in a 1:1 call. We can have this implemented in hanami-utils, so we don't have to bring a dependency of hanami-events for all the hanami-* gems.

davydovanton commented 5 years ago

yep, I just forgot to update this issue. Will do it now, thanks! <3