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

Adds RequestHandled event #286

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

Adds RequestHandled event #286

wants to merge 10 commits into from

Conversation

gehrisandro
Copy link
Collaborator

@gehrisandro gehrisandro commented Dec 5, 2023

This PR adds the ability register an event dispatcher.

When a request has been handled successfully and an event dispatcher is registered, a RequestHandled event will be dispatched.
The event contains the initial Payload of the request and the Response.

This feature is required to create a Recorder for Laravel Pulse in the openai/laravel repository.

Todos:

  • Find a better name for the Transportable contract
  • Add events docs
  • Add missing factory tests

@cleptric
Copy link

Besides the Laravel Pulse use-case, we got some people asking to instrument this library in our Sentry Laravel SDK. Is there any appetite to move forward with this PR?

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