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(tracing): Use integer for content length #8152

Merged
merged 3 commits into from May 17, 2023

Conversation

AbhiPrasad
Copy link
Member

No description provided.

@AbhiPrasad AbhiPrasad requested review from a team, mydea and lforst and removed request for a team May 17, 2023 13:54
@@ -36,7 +36,7 @@ describe('envelope', () => {
expect(headers).toEqual({ event_id: 'aa3ff046696b4bc6b609ce6d28fde9e2', sent_at: '123' });
});

it.only('serializes an envelope with attachments', () => {
it('serializes an envelope with attachments', () => {
Copy link
Member 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
Member 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
Member Author

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
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
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
62 checks passed
@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.

None yet

2 participants