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

ref(tracing): Clean up various things before fixing sampling #2944

Merged
merged 15 commits into from
Sep 30, 2020

Conversation

lobsterkatie
Copy link
Member

Extracted from #2921, to try to make it less of an unwieldy mess. Random refactoring of stuff - mostly tests - not directly related to those changes, but which came as a consequence of working on that.

I believe the only minorly substantive changes are:

  • We had a default beforeNavigate which did nothing (in order that the option be able to be required), which I removed in favor of letting the option be optional and only running beforeNavigate if it's defined.
  • I removed the Response type since it's a dom type and not everyone compiles with those.
  • For XHR requests, the method and url are now added to the span when it's created rather than when it's finished, for consistency with fetch requests.

There's a bunch here, but I did my best to keep my commits clean* so it would be possible to look at each one individually and make sure I'm not doing anything nuts or breaking.

*only about one thing, named appropriately, with passing tests at each stage

@github-actions
Copy link
Contributor

github-actions bot commented Sep 29, 2020

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 18.01 KB (+0.01% 🔺)
@sentry/browser - Webpack 18.82 KB (0%)
@sentry/react - Webpack 18.82 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 23.81 KB (-0.03% 🔽)

@kamilogorek
Copy link
Contributor

It'll fix #2943 as well

packages/tracing/test/browser/request.test.ts Outdated Show resolved Hide resolved
packages/tracing/test/browser/request.test.ts Outdated Show resolved Hide resolved
@lobsterkatie lobsterkatie merged commit 0ee0799 into master Sep 30, 2020
@lobsterkatie lobsterkatie deleted the kmclb-pre-sampling-fixes-cleanup branch September 30, 2020 16:15
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