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

Feature request: Allow specifying a webhook to receive Plugin errors #124

Open
beaugunderson opened this issue Oct 9, 2024 · 9 comments

Comments

@beaugunderson
Copy link
Member

In working with Reagan yesterday and talking to Hines just now I think it would be very helpful for production plugin users to be able to receive errors reports for their plugins at a webhook URL of their choosing. This might serve a different purpose than the syslog logging we've talked about but it would be structured data (JSON) instead of text tracebacks, and so it may be worth implementing for that reason (maybe higher priority than the syslog logging even?)

Curious as to your thoughts...

@andhines
Copy link
Member

andhines commented Oct 9, 2024

Should also use sentry to improve observability, don't rely only on logs

@beaugunderson
Copy link
Member Author

Should also use sentry to improve observability, don't rely only on logs

For context, this is important for us internally--currently workflow-kit protocols do capture exceptions in Sentry but they all go into the same bucket; I added a PR this morning to move them to separate buckets with the same tag. I think we should do the same thing for exceptions that occur during plugin handling (again, for internal use).

@aduane
Copy link
Collaborator

aduane commented Oct 9, 2024

How do you see this being implemented? An ERRORS_WEBHOOK_URL set in the container that, if set, POSTs the JSON error payload to that URL? Or that the plugin runner can emit events that a plugin can be written to receive and handle (and presumably errors occurring in such an error handling plugin would not emit the error event to avoid an error ouroboros)?

@andhines
Copy link
Member

say "error ouroboros" five times fast

@aduane
Copy link
Collaborator

aduane commented Oct 10, 2024

I grew up in Florida, I can't say it one time fast.

@beaugunderson
Copy link
Member Author

An ERRORS_WEBHOOK_URL set in the container that, if set, POSTs the JSON error payload to that URL?

this is how I was thinking about it because it's simple and it means we can shoot the webhook requests out with celery, meaning we get redelivery for free

Or that the plugin runner can emit events that a plugin can be written to receive and handle (and presumably errors occurring in such an error handling plugin would not emit the error event to avoid an error ouroboros)?

this is a cool idea, and some advanced users might opt for it... but then they're responsible for redelivery themselves, and that might be a step backwards

@aduane
Copy link
Collaborator

aduane commented Oct 10, 2024

it means we can shoot the webhook requests out with celery, meaning we get redelivery for free

Does this imply you would send the error based on the return of the event gRPC method (in our case from home-app) rather than in the except in the plugin runner? Or do you think we would "teach" the plugin runner how to queue celery tasks? I do think we need to support async tasks in plugins, for the record, not sure if you intended to introduce that with this or not.

@beaugunderson
Copy link
Member Author

beaugunderson commented Oct 10, 2024 via email

@aduane
Copy link
Collaborator

aduane commented Oct 10, 2024

Sounds great!

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

No branches or pull requests

3 participants