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

fix: Add GCP error reporting log format to cloudevent functions and include panic message in stack trace. #230

Merged

Conversation

kenneth-rosario
Copy link
Contributor

@kenneth-rosario kenneth-rosario commented Feb 2, 2024

Panics are not being formatted correctly for cloud events. We need to use recoverPanic in the wrapper function and re panic after recovering so that the cloudevents go sdk can handle the panic correctly and return a 500 status code.

Had to revert back some versions in go.mod because go-cmp v0.6.0 made the min required go version 1.18.

@kenneth-rosario kenneth-rosario force-pushed the kennethrosario/fix-error-reporting-cloudevents branch from 4102872 to 302e22f Compare February 6, 2024 23:30
@kenneth-rosario kenneth-rosario changed the title fix: add recover panic to the cloud event http handler. fix: add recoverPanic to the cloud event http handler. Feb 6, 2024
@kenneth-rosario kenneth-rosario marked this pull request as ready for review February 6, 2024 23:43
@kenneth-rosario kenneth-rosario marked this pull request as draft February 12, 2024 18:22
@kenneth-rosario kenneth-rosario force-pushed the kennethrosario/fix-error-reporting-cloudevents branch from 9a038fa to 302e22f Compare February 12, 2024 18:30
@kenneth-rosario kenneth-rosario marked this pull request as ready for review February 12, 2024 18:32
@kenneth-rosario kenneth-rosario marked this pull request as draft February 13, 2024 18:38
@kenneth-rosario kenneth-rosario force-pushed the kennethrosario/fix-error-reporting-cloudevents branch 6 times, most recently from 7dad763 to 3edf520 Compare February 13, 2024 19:47
@kenneth-rosario kenneth-rosario changed the title fix: add recoverPanic to the cloud event http handler. fix: add error reporing log format to cloudevent functions and include panic message in stack trace. Feb 13, 2024
@kenneth-rosario kenneth-rosario marked this pull request as ready for review February 13, 2024 22:32
@kenneth-rosario kenneth-rosario changed the title fix: add error reporing log format to cloudevent functions and include panic message in stack trace. fix: Add GCP error reporting log format to cloudevent functions and include panic message in stack trace. Feb 14, 2024
@kenneth-rosario kenneth-rosario force-pushed the kennethrosario/fix-error-reporting-cloudevents branch from 3edf520 to 8739dff Compare February 14, 2024 03:31
@kenneth-rosario kenneth-rosario force-pushed the kennethrosario/fix-error-reporting-cloudevents branch from 8739dff to 9909d2b Compare February 14, 2024 03:32
@kenneth-rosario kenneth-rosario merged commit 0a89bb4 into main Feb 14, 2024
44 checks passed
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