-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(tracing): respect idleTimeout after last finished activity #4442
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
Conversation
Thanks for opening a PR! In essence this is a quiescence timeout - and def the approach we want to take. Holding off on merging this, because we'll need a wrapping final timeout in addition to a heurisitic to prevent polling (see comment in: https://github.com/getsentry/sentry-javascript/pull/2672/files#r440770700). We are currently exploring alternate algorithms. In addition, there is probably a way we can relate |
Hello there, Here there is another issue about the documentation that is not enough explicit, and adds confusion. It seems that the transaction will end when
Does this resume the current behaviour, or something is missing ? About the The risk is that all transaction duration become equals to Perhaps to fix it, a BC break is required. Except, with a feature flag. Yeah, the issue is not so easy to tackle as it depends on the application, use case, the product goal of the measure. |
Thanks for your interest in help addressing this! At the current moment, a transaction will trigger it's idle timeout the first moment it hits 0 activities (0 active child spans) - and will not reset this idleTimeout. This means that even if more activities are added afterwards (spans get started) after the activities count goes to 0, it'll still finish after the idletimeout is over, regardless if the spans were still in progress.
The polling interval is arbitrary here - it's dependent when child spans start/stop, because that's when we have logic around triggering the various timeouts. We probably want to phase out Here's what I'm thinking on a high level (this will change when we implement though!):
This means we can remove the heartbeat, and
Don't think we need a breaking change - I think if we move to a more correct behaviour, we can accept slight behaviour differences in terms of data that show up. Another complexity here is that our React Native SDK uses |
LGTM Replying to your high level thinking by trying to find questions.
When the transaction should end?
Should inactivity detection be effective during 100ms or less? (e.g. use case synchronous spans) Hum, timing concern.
When the [Delirium] Does this heuristic may be closed to the exponential back off but reversed (e.g. 1s, 800m, 400m, 0)?
Can you give an example of the adjustment? Wrapping upThere are 3 topics
|
Should be addressed by #4531 |
yarn lint
) & (yarn test
).