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

Idle transaction refactoring #3988

Merged

Conversation

naseemkullah
Copy link
Contributor

@naseemkullah naseemkullah commented Sep 18, 2021

  • simplify heartbeatString creation
  • fix initTimeout return type + jsdoc for better discoverability in IDE
  • remove unused reference heart beat timeout
  • dedupe HEARTBEAT_INTERVAL and DEFAULT_IDLE_TIMEOUT between src and test

cc @AbhiPrasad

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good changes, thanks for the improvements.

@@ -232,14 +234,12 @@ export class IdleTransaction extends Transaction {
* If this occurs we finish the transaction.
*/
private _beat(): void {
clearTimeout(this._heartbeatTimer);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I’m wondering why we had this clear timeout logic in the first place 🤔

@naseemkullah
Copy link
Contributor Author

naseemkullah commented Sep 18, 2021

Good changes, thanks for the improvements.

My pleasure! Was looking trying to figure out why all our transactions result in failed heartbeats despite the long idle timeout setting and refactored along the way. Still not sure why, will continue investigating though.

@AbhiPrasad AbhiPrasad self-assigned this Sep 19, 2021
@kamilogorek kamilogorek merged commit eea6d54 into getsentry:master Sep 20, 2021
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