Manual TTID/TTFD API times out
Platform:
- [x] iOS
SDK:
- [x]
@sentry/react-native(>= 1.0.0) - [ ]
react-native-sentry(<= 0.43.2)
SDK version: 5.22.0
react-native version: 0.72.3
Are you using Expo?
- [ ] Yes
- [x] No
Are you using sentry.io or on-premise?
- [x] sentry.io (SaaS)
- [ ] on-premise
Configuration:
export const routingInstrumentation = new Sentry.ReactNavigationInstrumentation(
{
enableTimeToInitialDisplay: true,
},
);
Sentry.init({
environment: 'development'
sampleRate: 1.0,
tracesSampleRate: 0.1,
enableAppHangTracking: false,
integrations: [
new Sentry.ReactNativeTracing({
routingInstrumentation,
tracePropagationTargets: [currentConfig.DOMAIN],
}),
],
});
I have the following issue:
I am seeing some inconsistencies in the data reported and what should be reported based on the SDK behaviour. For example, it is odd to me that some transactions are being marked as 'deadline_exceeded' when they do not exceed the default value for [finalTimeoutMs]. finalTimeoutMs is also not being overridden in the init code block
The default for finalTimeoutMs is 600000ms or 10mins, which is way above what the transactions being marked deadline_exceeded are reporting. The amount of failed transactions with this status seems to have increased after updating the SDK version from 5.3.0 to 5.22.0
More details with links to examples in the Customer Case
Hi @serglom21, thank you for the message,
I agree, it doesn't sound right, that these transaction are marked as deadline_exceeded. I'll take a look at the examples and keep you updated.
Are you using something on the screens with deadline_exceeded a code called Stack.Navigator to switch between different pages? You can usually find it by looking for the term <Stack.Navigator> in your code
Are you using something on the screens with
deadline_exceededa code calledStack.Navigatorto switch between different pages? You can usually find it by looking for the term <Stack.Navigator> in your code
Yep, we are using the Stack.Navigator.
Hi, I found a potential fix for your case and a solution will be implemented soon on the SDK.
Hi, I found a potential fix for your case and a solution will be implemented soon on the SDK.
@lucas-zimerman thanks a lot for it, we are expecting to solve this issue ASAP to normalize our failure_rate metrics. When you had an stable version with the fix, could you share it here, pls?
@julianosbentowellhub definitely, we'll update here when the fix is verified and released.
@kahest same issue here: deadline_exceeded on all route change using react native Stack.Navigator.
Here is our configuration:
Sentry.init({
dsn: '...',
debug: true,
environment: ENV.APP_ENV,
tracesSampleRate: 1,
enableNative: true,
sampleRate: 1,
attachStacktrace: true,
ignoreErrors: [
/.*[Network error]: Error: Socket closed.*/i,
/.*Socket closed.*/i
],
_experiments: {
profilesSampleRate: 1
},
enableAutoPerformanceTracing: true,
integrations: [
new Sentry.ReactNativeTracing({
enableUserInteractionTracing: true,
enableStallTracking: true,
enableHTTPTimings: true,
enableAppStartTracking: true,
maxTransactionDuration: 600 * 1000,
enableNativeFramesTracking: true,
routingInstrumentation: {
enableTimeToInitialDisplay: true,
routeChangeTimeoutMs: 6000
}
})
]
});
Hi @jimmysafe, thank you for the message,
are there any specific span in the transactions, which are causing the deadline_exceeded? For example the Time To Display spans?
Hi @krystofwoldrich
The span which hangs and fails is the navigation span, i guess the issue is related to the fact we are using the <Stack.Navigator> in react native.
Also the Time to inital display is affected too by being always cancelled.
Please let me know if you need more info :)
@jimmysafe Thank you for the confirmation,
- this will be fixed by https://github.com/getsentry/sentry-react-native/pull/4042
At the moment you can use manual TTID APIs https://docs.sentry.io/platforms/react-native/tracing/instrumentation/time-to-display/#time-to-initial-display-overwrite as a workaround or temporarly disable the feature.
Even with manual ttids we see 80% cancelled or deadline_exceeded with 15s duration.
On Fri, Sep 13, 2024, 7:00 a.m. Krystof Woldrich @.***> wrote:
@jimmysafe https://github.com/jimmysafe Thank you for the confirmation,
- this will be fixed by #4042 https://github.com/getsentry/sentry-react-native/pull/4042
At the moment you can use manual TTID APIs https://docs.sentry.io/platforms/react-native/tracing/instrumentation/time-to-display/#time-to-initial-display-overwrite as a workaround or temporarly disable the feature.
— Reply to this email directly, view it on GitHub https://github.com/getsentry/sentry-react-native/issues/3934#issuecomment-2348660631, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALJE44WVUOPKNYGEXVIMYTZWLATBAVCNFSM6AAAAABKRZZVU6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBYGY3DANRTGE . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi @sregg, thank for the message,
are you experiencing this on iOS or Android?
Note I saw iOS in https://github.com/getsentry/sentry-react-native/issues/3786
Are you able to reproduce it locally? Would you be able to share a reproducible example?
iOS and Android. It's mostly in the wild from now but I can try to repro locally. I believe last time I was seeing that when I would navigate back to the screen. I'll report back.
Also, is it normal that the status is unknown when it's not timing out?
Here's our home screen for example:
I'm able to repro the deadline_exceeded and the 15s timeout every time I navigate back to a screen
@sregg same here, we get tons of unknown status and i can confirm that even by using the <Sentry.TimeToInitialDisplay record={true} /> the issue of of deadline_exceeded persists.
Thank you both for the reports, we're working on this. Which versions of the SDK are you using?
Thank you both for the reports, we're working on this. Which versions of the SDK are you using?
v5.31.1
@kahest any news on this fix?
Hi @jimmysafe, we are still looking into this.