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

feat(api): add exception log #7225

Merged
merged 1 commit into from
Dec 6, 2024
Merged

feat(api): add exception log #7225

merged 1 commit into from
Dec 6, 2024

Conversation

djabarovgeorge
Copy link
Contributor

What changed? Why was the change needed?

It seems we rely heavily on the Pino logger's request errored event to give us details about errors. However, the error object is quite limited and only provides minimal information.

{ error : {class, message, stack} }
image

I tried passing extra data, but it wasn't provided. Even pinoLogger.assign didn’t include the additional workflow ID parameter.
Adding another log in the exception filter, like we do for 5XX errors, allows us to include more parameters.

image

We could add this log to provide a structured object.

The next step could be disabling autoLogging in the Pino logger since request errored is already handled in the ExceptionFilter.

If request completed is needed, we can add it to the Next.js Interceptor.

Screenshots

Expand for optional sections

Related enterprise PR

Special notes for your reviewer

Copy link

netlify bot commented Dec 5, 2024

Deploy Preview for dashboard-v2-novu-staging ready!

Name Link
🔨 Latest commit 48d0352
🔍 Latest deploy log https://app.netlify.com/sites/dashboard-v2-novu-staging/deploys/6751d0251e5f240008fca0fc
😎 Deploy Preview https://deploy-preview-7225.dashboard-v2.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 5, 2024

Deploy Preview for dev-web-novu ready!

Name Link
🔨 Latest commit 48d0352
🔍 Latest deploy log https://app.netlify.com/sites/dev-web-novu/deploys/6751d02531e23f000808d199
😎 Deploy Preview https://deploy-preview-7225.dashboard.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@djabarovgeorge djabarovgeorge merged commit d6b7762 into next Dec 6, 2024
31 of 32 checks passed
@djabarovgeorge djabarovgeorge deleted the add-exception-log branch December 6, 2024 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants