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: retry count in url #864

Merged
merged 23 commits into from
Oct 30, 2023
Merged

feat: retry count in url #864

merged 23 commits into from
Oct 30, 2023

Conversation

pauldambra
Copy link
Member

@pauldambra pauldambra commented Oct 27, 2023

During an incident we are sometimes flooded with retries from the JS SDK.

Or at least we believe we are. And, when we are we don't know how many retries there are.

Let's add the retry count to the URL so we can figure things out by inspecting the capture logs

Tested locally that I can still ingest events etc

src/request-utils.ts Fixed Show fixed Hide fixed
src/request-utils.ts Fixed Show fixed Hide fixed
@github-actions
Copy link

github-actions bot commented Oct 27, 2023

Size Change: +1.01 kB (0%)

Total Size: 712 kB

Filename Size Change
dist/array.full.js 171 kB +312 B (0%)
dist/array.js 112 kB +331 B (0%)
dist/es.js 112 kB +331 B (0%)
dist/exception-autocapture.js 12 kB +1 B (0%)
dist/module.js 112 kB +331 B (0%)
dist/recorder-v2.js 95 kB -101 B (0%)
dist/recorder.js 58.3 kB -101 B (0%)
dist/surveys.js 39.6 kB -96 B (0%)

compressed-size-action

src/send-request.ts Outdated Show resolved Hide resolved
@@ -29,7 +32,7 @@ export const addParamsToURL = (

export const encodePostData = (data: PostData | Uint8Array, options: Partial<XHROptions>): string | BlobPart | null => {
if (options.blob && data.buffer) {
return new Blob([data.buffer], { type: 'text/plain' })
return new Blob([_isUint8Array(data) ? data : data.buffer], { type: 'text/plain' })
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

our JS tests were using snapshots here. And the snapshot was happily passing when this method returned the empty array for Uint8Arrays passed in

@pauldambra
Copy link
Member Author

@daibhin @benjackwhite it's best to go through this one a commit at a time with hide whitespace on 🙈

@pauldambra
Copy link
Member Author

Screenshot 2023-10-27 at 13 14 31

the moving around of things is partly because we have a big chunk of the bundle in utils.ts and can't see what is making up the size. As I split it up we'll be able to more easily see what we could optimise

src/utils/request-utils.ts Fixed Show fixed Hide fixed
src/utils/request-utils.ts Fixed Show fixed Hide fixed
@pauldambra pauldambra added the bump patch Bump patch version when this PR gets merged label Oct 27, 2023
@pauldambra pauldambra merged commit 0fe7971 into master Oct 30, 2023
14 checks passed
@pauldambra pauldambra deleted the feat/retry-count-in-url branch October 30, 2023 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump patch Bump patch version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants