Skip to content

Conversation

@AbhiPrasad
Copy link
Member

@AbhiPrasad AbhiPrasad commented Jun 29, 2023

ref #8352

This PR makes sure the BrowserTracing integration updates the propagation context based on meta tags. To ensure we don't keep the same propagation context, we continuously update it every time a route change should happen (navigation).

Note that we have a bunch of test changes here. This is because we actually weren't running any of the tracing tests in CI because of a blanket ignore we use (this logic is all in @sentry-internal/tracing. I'm fixing this in a follow up PR.

"test": "lerna run --ignore @sentry-internal/* test",
"test:unit": "lerna run --ignore @sentry-internal/* test:unit",

@AbhiPrasad AbhiPrasad requested review from a team, lforst and stephanie-anderson and removed request for a team June 29, 2023 19:56
@AbhiPrasad AbhiPrasad self-assigned this Jun 29, 2023
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 21.78 KB (0%)
@sentry/browser - ES5 CDN Bundle (minified) 68.44 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 20.08 KB (+0.01% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 59.72 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 21.69 KB (0%)
@sentry/browser - Webpack (minified) 70.83 KB (0%)
@sentry/react - Webpack (gzipped + minified) 21.72 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 50.27 KB (+0.35% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 29.77 KB (+0.44% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 27.83 KB (+0.42% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 49.43 KB (0%)
@sentry/replay - Webpack (gzipped + minified) 43.12 KB (0%)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 69.22 KB (+0.21% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 61.65 KB (+0.01% 🔺)

@AbhiPrasad
Copy link
Member Author

This PR address the tracing tests stuff: #8431

Copy link
Contributor

@lforst lforst left a comment

Choose a reason for hiding this comment

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

lgtm!

* @returns Span if a span was created, otherwise void.
*/
function fetchCallback(
export function fetchCallback(
Copy link
Member

Choose a reason for hiding this comment

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

l: why is this change necessary?

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 was because this was actually being imported by tests:

import { fetchCallback, instrumentOutgoingRequests, shouldAttachHeaders, xhrCallback } from '../../src/browser/request';

* @returns Span if a span was created, otherwise void.
*/
function xhrCallback(
export function xhrCallback(
Copy link
Member

Choose a reason for hiding this comment

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

l: same question here

@AbhiPrasad AbhiPrasad merged commit e087afe into develop Jun 30, 2023
@AbhiPrasad AbhiPrasad deleted the abhi-twp-browsertracing branch June 30, 2023 14:23
AbhiPrasad added a commit that referenced this pull request Jul 1, 2023
Building on top of
#8430, this PR makes
a quick fix to make sure we are running unit tests for
`@sentry-internal/eslint-plugin`, `@sentry-internal/tracing`, and
`@sentry-internal/replay-worker`. This was found not to be running
before because we had a blanket `--ignore @sentry-internal/*` when
making lerna run tests.
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.

4 participants