Skip to content

fix(tracing): Use integer for content length#8152

Merged
AbhiPrasad merged 3 commits intodevelopfrom
abhi-response-content-len-int
May 17, 2023
Merged

fix(tracing): Use integer for content length#8152
AbhiPrasad merged 3 commits intodevelopfrom
abhi-response-content-len-int

Conversation

@AbhiPrasad
Copy link
Copy Markdown
Contributor

No description provided.

@AbhiPrasad AbhiPrasad requested review from a team, lforst and mydea and removed request for a team May 17, 2023 13:54
});

it.only('serializes an envelope with attachments', () => {
it('serializes an envelope with attachments', () => {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it.only 😭

span.setData('http.response_content_length', contentLength);

const contentLengthNum = parseInt(contentLength);
if (contentLengthNum > 0) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this check takes care of NaN also

const postRequestFetchHandlerData = {
...fetchHandlerData,
endTimestamp,
response: { status: 404, headers: { get: () => 123 } },
Copy link
Copy Markdown
Contributor Author

@AbhiPrasad AbhiPrasad May 17, 2023

Choose a reason for hiding this comment

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

shimming out the headers obj since not available in test

Copy link
Copy Markdown
Member

@Lms24 Lms24 May 17, 2023

Choose a reason for hiding this comment

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

Yeah its painful but I also had to do this somewhere 😅

@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 21.03 KB (+0.06% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 65.68 KB (+0.09% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 19.59 KB (+0.11% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 58.15 KB (+0.12% 🔺)
@sentry/browser - Webpack (gzipped + minified) 21.2 KB (+0.16% 🔺)
@sentry/browser - Webpack (minified) 69.07 KB (+0.05% 🔺)
@sentry/react - Webpack (gzipped + minified) 21.22 KB (+0.16% 🔺)
@sentry/nextjs Client - Webpack (gzipped + minified) 49.16 KB (+0.09% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 28.67 KB (+0.09% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 26.9 KB (+0.1% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 48.19 KB (+1.21% 🔺)
@sentry/replay - Webpack (gzipped + minified) 42.06 KB (+1.45% 🔺)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 67.17 KB (+1% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 60.06 KB (+1.15% 🔺)

@AbhiPrasad AbhiPrasad merged commit 8f74eb3 into develop May 17, 2023
@AbhiPrasad AbhiPrasad deleted the abhi-response-content-len-int branch May 17, 2023 14:56
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