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

[VERY WIP] ref(tracing): Restructure Tracing Integration #2705

Closed

Conversation

AbhiPrasad
Copy link
Member

🚧 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:

  • Refactor Tracing to be much more modular
  • The concept of browser instrumentation and idle transactions should be separate (we can maybe then reuse idleTransaction in electron/react-native in the future)
  • There should be an extensible TracingRouter class, that will create pageload/navigation transactions and handle everything related to that. Then any routing library can extend from this class and create their own pageload and navigation transactions
  • WIP

Here are the rough changes here,

  1. Create src/idleTransaction.ts
    • The IdleTransaction class extends the Transaction class, and just adds functionality to track activities
    • Every time a span is added, an activity is pushed
    • Everytime span.finish() is called, an activity is finished
    • When the number of activities goes to 0, the
    • autoPopAfter is removed from pushActivity, instead we put that into the span functionality (?)
    • WIP
  2. Add idleTimeout?: number as argument for hub.startTransaction
    • if number is true, we create an IdleTransaction otherwise we create a Transaction
  3. Create BrowserTracing integration in src/integrations/browsertracing
    • WIP
  4. Create TracingRouter class that can be imported from src/integrations/router.ts
    • WIP
  5. WIP

@AbhiPrasad AbhiPrasad requested a review from HazAT June 29, 2020 18:49
@AbhiPrasad AbhiPrasad force-pushed the abhi/ref/browser-tracing branch 2 times, most recently from b435b27 to 2a294c3 Compare June 30, 2020 19:15
@AbhiPrasad AbhiPrasad force-pushed the abhi/feat/tracing branch 2 times, most recently from c1a11a1 to 762568c Compare June 30, 2020 19:18
@AbhiPrasad AbhiPrasad changed the base branch from abhi/feat/tracing to abhi/ref/add-sentry-tracing July 3, 2020 01:46
@AbhiPrasad AbhiPrasad force-pushed the abhi/ref/browser-tracing branch from 6141eee to 1efd526 Compare July 3, 2020 01:50
@AbhiPrasad AbhiPrasad force-pushed the abhi/ref/add-sentry-tracing branch from ab7d985 to 14eba60 Compare July 3, 2020 17:00
@AbhiPrasad AbhiPrasad force-pushed the abhi/ref/browser-tracing branch 4 times, most recently from 567502a to e87aae7 Compare July 3, 2020 17:17
@AbhiPrasad AbhiPrasad changed the base branch from abhi/ref/add-sentry-tracing to master July 3, 2020 17:17
@AbhiPrasad AbhiPrasad changed the base branch from master to abhi/ref/add-sentry-tracing July 3, 2020 17:18
@AbhiPrasad AbhiPrasad force-pushed the abhi/ref/add-sentry-tracing branch from 8906f3a to ef59276 Compare July 3, 2020 17:20
@AbhiPrasad AbhiPrasad force-pushed the abhi/ref/browser-tracing branch 2 times, most recently from f989678 to e62d295 Compare July 3, 2020 17:22
CHANGELOG

Rename tracing to APM

bring back APM

fix: APM -> tracing

feat(tracing): Add @sentry/tracing

delete src

mass rename

mass move test

chore: Change APM -> Tracing

feat(tracing): Add IdleTransaction class

ref: Delete Tracing integration

feat: BrowserTracing integration

some comments about what I've done so far

router stuff

more router changes

more comments and thoughts

refactor heartbeat

beforeFinish

Squash 1

router tracing init

reset active transactions

more idle transaction refactor

Revert "mass move test"

This reverts commit c1a11a1.

Revert "mass rename"

This reverts commit 8173c5d.

Revert "delete src"

This reverts commit 0298cd4.

fix routing typings

sentry-trace meta tag

Add request logic

smaller errors + backgroundtab

performance

fix stuff

fix some errors

get it working

it finally works :)

zero counter

react changes

Vue changes

Fix all errors

delete tracing again again

any typings

any changes

more refactors

Fix performance and router

better
@AbhiPrasad AbhiPrasad force-pushed the abhi/ref/browser-tracing branch from e62d295 to 3c90917 Compare July 3, 2020 19:55
@AbhiPrasad AbhiPrasad closed this Jul 13, 2020
@AbhiPrasad AbhiPrasad deleted the abhi/ref/browser-tracing branch July 13, 2020 12:31
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.

1 participant