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

Manual TTID/TTFD API times out #3934

Open
4 of 7 tasks
serglom21 opened this issue Jul 9, 2024 · 18 comments · May be fixed by #4042
Open
4 of 7 tasks

Manual TTID/TTFD API times out #3934

serglom21 opened this issue Jul 9, 2024 · 18 comments · May be fixed by #4042

Comments

@serglom21
Copy link

serglom21 commented Jul 9, 2024

Platform:

  • iOS

SDK:

  • @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
  • No

Are you using sentry.io or on-premise?

  • 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

@krystofwoldrich
Copy link
Member

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.

@lucas-zimerman
Copy link
Collaborator

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

@julianosbentowellhub
Copy link

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

Yep, we are using the Stack.Navigator.

@lucas-zimerman
Copy link
Collaborator

Hi, I found a potential fix for your case and a solution will be implemented soon on the SDK.

@julianosbentowellhub
Copy link

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?

@kahest
Copy link
Member

kahest commented Aug 26, 2024

@julianosbentowellhub definitely, we'll update here when the fix is verified and released.

@jimmysafe
Copy link

@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  
       }
    })
  ]
});

Image

@krystofwoldrich
Copy link
Member

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?

@jimmysafe
Copy link

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.

Image

Please let me know if you need more info :)

@krystofwoldrich
Copy link
Member

@jimmysafe Thank you for the confirmation,

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.

@sregg
Copy link

sregg commented Sep 13, 2024 via email

@krystofwoldrich
Copy link
Member

krystofwoldrich commented Sep 13, 2024

Hi @sregg,
thank for the message,

are you experiencing this on iOS or Android?

Note I saw iOS in #3786

Are you able to reproduce it locally? Would you be able to share a reproducible example?

@krystofwoldrich krystofwoldrich changed the title Increase in deadline_exceeded statuses after upgrade to 5.22.0 Manual TTID/TTFD API times out Sep 13, 2024
@sregg
Copy link

sregg commented Sep 13, 2024

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.

@sregg
Copy link

sregg commented Sep 13, 2024

Also, is it normal that the status is unknown when it's not timing out?
Image
Here's our home screen for example:
Image

@sregg
Copy link

sregg commented Sep 13, 2024

I'm able to repro the deadline_exceeded and the 15s timeout every time I navigate back to a screen
Image

@jimmysafe
Copy link

@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.

@kahest
Copy link
Member

kahest commented Sep 16, 2024

Thank you both for the reports, we're working on this. Which versions of the SDK are you using?

@sregg
Copy link

sregg commented Sep 16, 2024

Thank you both for the reports, we're working on this. Which versions of the SDK are you using?

v5.31.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: In Progress
7 participants