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 parts of request metadata being missing from some events #1879

Merged
merged 4 commits into from
Dec 6, 2022

Conversation

imjoehaines
Copy link
Contributor

Goal

Request metadata is stored in two places on an Event — some goes in event.request and other bits are added as metadata. This is because the Bugsnag API accepts some request data as a top-level field, but we add more data than the API supports so these bits have to go in metadata

We were adding this metadata on the requestClient instead of the event and were doing so in an on error callback, which is too late to affect the already-created event. This would affect any subsequent events, though, so the data was present in some cases. This was broken when we moved from adding request data when our middleware was called to adding it in a callback, which was done to ensure we reported the final state of the request as other middleware could mutate it

@github-actions
Copy link

github-actions bot commented Dec 6, 2022

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 43.19 kB 13.21 kB
After 43.19 kB 13.21 kB
± No change No change

code coverage diff

<temporarily disabled>

Generated by 🚫 dangerJS against 8b56b1f

@imjoehaines imjoehaines merged commit 9e01911 into next Dec 6, 2022
@imjoehaines imjoehaines deleted the server-metadata-fix branch December 6, 2022 17:17
@gingerbenw gingerbenw mentioned this pull request Jan 25, 2023
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.

3 participants