[VERY WIP] ref(tracing): Restructure Tracing Integration #2705
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🚧 Please note this is a POC PR, and so is very messy
The actual PR will probably just be another branch with some cherry picked commits from this branch
This is a POC PR for the DACI I am working on to restructure the Tracing integration.
The PR is not based on master, yet is instead based on
abhi/feat/tracing, a branch that added@sentry/tracingpackage. As such, all the changes in this PR are based this new@sentry/tracingpackage (in hindsight this was completely unnecessary as this is just a PR used for discussion, but I got a little ahead of myself :P)The rough goals here:
Tracingto be much more modularidleTransactionin electron/react-native in the future)Here are the rough changes here,
src/idleTransaction.tsIdleTransactionclass extends theTransactionclass, and just adds functionality to track activitiesspan.finish()is called, an activity is finishedautoPopAfteris removed from pushActivity, instead we put that into the span functionality (?)idleTimeout?: numberas argument forhub.startTransactionnumberis true, we create anIdleTransactionotherwise we create aTransactionBrowserTracingintegration insrc/integrations/browsertracingTracingRouterclass that can be imported fromsrc/integrations/router.ts