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

maxTransactionDuration should be ms when passing to startIdleTransaction #2469

Merged
merged 2 commits into from
Sep 15, 2022

Conversation

marandaneto
Copy link
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

/**
* The maximum duration of a transaction before it will be marked as "deadline_exceeded".
* If you never want to mark a transaction set it to 0.
* Time is in seconds.
*
* Default: 600
*/
maxTransactionDuration: number;
maxTransactionDuration is documented as in seconds.

https://github.com/getsentry/sentry-javascript/blob/fbd4ef07dd4248a1a9f8a80e0c220628a663f91c/packages/tracing/src/idletransaction.ts#L79-L87
defines both values in ms

When passing the values to the idle transaction, we need to convert the one in seconds to milliseconds

idleTimeout,
maxTransactionDuration,

💡 Motivation and Context

#2468
#2467

💚 How did you test it?

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • All tests passing
  • No breaking changes

🔮 Next steps

@krystofwoldrich
Copy link
Member

I've tested this with our sample app. It works and fixes both of the mentioned issues.

@marandaneto marandaneto marked this pull request as ready for review September 15, 2022 05:36
@marandaneto
Copy link
Contributor Author

@krystofwoldrich would you like to add the changelog entry, approve, merge and release it? :)

@krystofwoldrich krystofwoldrich self-requested a review September 15, 2022 06:45
Copy link
Member

@krystofwoldrich krystofwoldrich left a comment

Choose a reason for hiding this comment

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

Looks good. As we talked about how to improve the options I've wrote it down here #2471

@krystofwoldrich krystofwoldrich merged commit a41b08b into main Sep 15, 2022
@krystofwoldrich krystofwoldrich deleted the fix/max_transaction_ms branch September 15, 2022 06:58
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.

3 participants