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
feat(tracing): Make BrowserTracing heartbeat interval configurable #5867
base: master
Are you sure you want to change the base?
Conversation
f761887
to
07ed1fc
Compare
Thanks for opening this PR! On first glance this looks like a good change to me. We should try though to not make this breaking change (see my comment).
Would you mind adding a test that tests a custom heartbeat interval?
Side note:
When we merge this, we'll need to update the BrowserTracing options in docs as well. You obviously don't have to do this but I'm just putting it down here so we don't forget.
| @@ -186,13 +186,14 @@ export function startIdleTransaction( | |||
| transactionContext: TransactionContext, | |||
| idleTimeout: number, | |||
| finalTimeout: number, | |||
| heartbeatInterval: number, | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make heartbeatInterval an optional parameter? startIdleTransaction is publicly exposed and if heartbeatInterval is a mandatory param, this would be a breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed!
|
I've made |
|
Thank you. |
|
@outsideris I just noticed that our linter check fails because of format errors in |
|
I fixed the lint errors. I missed it when I committed the suggestion on GitHub. |
Thanks @outsideris! The PR looks good to me.
For the team: Let's wait with merging it until have a PR which updates our docs accordingly.
@outsideris apologies for missing this initially but the startIdleTransaction signature needs to be changed because it's still potentially breaking. Would you mind making this change? If not we can do it too.
|
I fixed the breaking change and tests as well. |
|
Thanks @outsideris. Seems like GH Actions have an incident going on which is why CI won't run. Will take a final look tomorrow. Added a docs PR in the meantime: getsentry/sentry-docs#5606 |
Signed-off-by: Outsider <outsideris@gmail.com>
Signed-off-by: Outsider <outsideris@gmail.com>
Signed-off-by: Outsider <outsideris@gmail.com>
Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
Signed-off-by: Outsider <outsideris@gmail.com>
Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
Signed-off-by: Outsider <outsideris@gmail.com>
|
I rebased this on latest master. |
|
I couldn't find why the tests failed. Any hints? |
Close #4925
The heartbeat interval was hard coded.
This PR makes heartbeat interval configurable via
BrowserTracingOptions.