[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/tracing
package. As such, all the changes in this PR are based this new@sentry/tracing
package (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:
Tracing
to be much more modularidleTransaction
in electron/react-native in the future)Here are the rough changes here,
src/idleTransaction.ts
IdleTransaction
class extends theTransaction
class, and just adds functionality to track activitiesspan.finish()
is called, an activity is finishedautoPopAfter
is removed from pushActivity, instead we put that into the span functionality (?)idleTimeout?: number
as argument forhub.startTransaction
number
is true, we create anIdleTransaction
otherwise we create aTransaction
BrowserTracing
integration insrc/integrations/browsertracing
TracingRouter
class that can be imported fromsrc/integrations/router.ts