sentry-javascript
sentry-javascript copied to clipboard
Make heartbeat interval configurable
Problem Statement
I have a pageload transaction that normally should take 30s+ to finish, but IdleTransaction's heartbeat is finishing the transaction before the page content is fully loaded.
Solution Brainstorm
Make heartbeat interval configurable
I believe this is already possible by using the idleTimeout
option of the BrowserTracing
integration. You can read more about it here: https://docs.sentry.io/platforms/javascript/performance/instrumentation/automatic-instrumentation/#idletimeout
Let me know if this fits your case!
I believe this is already possible by using the
idleTimeout
option of theBrowserTracing
integration. You can read more about it here: https://docs.sentry.io/platforms/javascript/performance/instrumentation/automatic-instrumentation/#idletimeoutLet me know if this fits your case!
Unfortunately not. Even if I configure 60s as idleTimeout, after 15s (3 heartbeats) with the same activity count, it finishes the transaction.
Ah yeah you are right. The amount of heartbeats and their intervals are currently hardcoded. I'll backlog this and take it to the team. Thanks for writing in!
By the way, feel free to open a PR! :) We'll look over it and assist in writing tests and documentation.
Nice! Added to my backlog as well :D Thanks!