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

fix: Make APM optional in gatsby package #2752

Merged
merged 3 commits into from Jul 20, 2020
Merged

Conversation

AbhiPrasad
Copy link
Member

@AbhiPrasad AbhiPrasad commented Jul 17, 2020

This PR has two changes after I did some testing with gatsby (https://github.com/getsentry/develop)

  1. fix: Make APM optional in gatsby package

If a user has @sentry/apm or @sentry/tracing, we will use it, otherwise just fallback to normal.

image

  1. ref: Use idleTimout if no activities occur in idle transaction

If idleTransaction does not get any activities pushed in the idleTimeout specified we finish the transaction (it most likely points to a simple page with no requests going to happen).

We do this by setting a timeout on idle transaction creation. The moment we push an activity, we cancel this timeout and instead rely on the activity system to end the transaction. This is behaviour that was in @sentry/apm where it would fake push and pop an activity when creating an idle transaction.

image

@github-actions
Copy link
Contributor

github-actions bot commented Jul 17, 2020

size-limit report

Path Size Loading time (3g) Running time (snapdragon) Total time
@sentry/browser - CDN Bundle (gzipped) 17.64 KB (+0.01% 🔺) 353 ms (+0.01% 🔺) 528 ms (-8.26% 🔽) 881 ms
@sentry/browser - Webpack 18.39 KB (0%) 368 ms (0%) 746 ms (+3.83% 🔺) 1.2 s
@sentry/react - Webpack 18.39 KB (0%) 368 ms (0%) 761 ms (-5.63% 🔽) 1.2 s
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 22.57 KB (+0.15% 🔺) 452 ms (+0.15% 🔺) 657 ms (-13.57% 🔽) 1.2 s

@getsentry-bot
Copy link
Contributor

getsentry-bot commented Jul 17, 2020

Messages
📖

@sentry/browser bundle gzip'ed minified size: (ES5: 17.2373 kB) (ES6: 16.3535 kB)

📖 ✅ TSLint passed

Generated by 🚫 dangerJS against 5c2089e

@AbhiPrasad AbhiPrasad merged commit cd7d887 into master Jul 20, 2020
@AbhiPrasad AbhiPrasad deleted the abhi/apm-in-gatsby branch July 20, 2020 12:11
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

3 participants