-
Notifications
You must be signed in to change notification settings - Fork 251
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
remove js payload limit #1823
remove js payload limit #1823
Conversation
const req = new win.XDomainRequest() | ||
req.onload = function () { | ||
cb(null) | ||
} | ||
req.onerror = function () { | ||
client._logger.error('Event failed to send…\n') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
node does logger.error(
Event failed to send…` so I thought maybe the browser delivery methods should too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changelog wording seems fine to me, but @gareththackeray might have a better idea
Co-authored-by: Gareth Thackeray <gareth.thackeray@smartbear.com>
77f3f51
to
ee08e33
Compare
cdec715
to
6ba92ad
Compare
Feature: Delivery of errors | ||
|
||
Scenario: Delivery for an oversized error is not retried | ||
Given I launch an app with configuration: | ||
| bugsnag | default | | ||
And I set the HTTP status code for the next "POST" request to 400 | ||
And I click "oversized-notify" | ||
Then I wait to receive an error | ||
|
||
# Check that Bugsnag is discarding the event | ||
And I wait to receive 3 logs | ||
Then I discard the oldest log | ||
Then I discard the oldest log | ||
And the log payload field "message" equals "Event oversized (2.00 MB)" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Cawllec this doesn't run because the steps are undefined for electron. Perhaps this is something we can add later as I'm happy the manual testing has shown no issues
@@ -15,13 +15,11 @@ Serialized payload was ${payload.length / 10e5}MB (limit = 1MB) | |||
metadata was removed` | |||
} | |||
payload = jsonStringify(event, null, null, { redactedPaths: EVENT_REDACTION_PATHS, redactedKeys }) | |||
if (payload.length > 10e5) throw new Error('payload exceeded 1MB limit') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the change can be summarised as: don't throw here so each delivery mechanism attempts the send. For delivery mechanisms that support retries we explicitly make it not retryable if the payload was above the threshold (regardless of 400 status code or not)
1ac085c
to
c336d30
Compare
@imjoehaines @gingerbenw I've requested a re-review. The implementation hasn't changed since you last looked but there has been some work on the e2e tests so I thought it would be good for some more eyes on it again before we merge |
Goal
Design
Changeset
Testing