Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Adds RequestHandled event #286

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

Draft
gehrisandro wants to merge 10 commits into main
base: main
Choose a base branch
Loading
from add-events
Draft

Adds RequestHandled event #286

gehrisandro wants to merge 10 commits into main from add-events

Conversation

Copy link
Collaborator

@gehrisandro gehrisandro commented Dec 5, 2023
edited
Loading

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

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?

AbhiPrasad reacted with thumbs up emoji

Copy link

I am interested in this - to centrally log requests/responses and track costs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /