question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warm and Cold start metrics not reported

See original GitHub issue

Environment

How do you use Sentry? RN app on iOS only Sentry SaaS (sentry.io) or self-hosted/on-premise (which version?): Sentry.io

Which SDK and version? 3.0.1 e.g: JavaScript 5.11.1, .NET 1.2.0

Steps to Reproduce

  1. Wrapped app with Sentry.wrap(App)

Expected Result

Cold and warm start metrics automatically captured as the docs suggest.

Actual Result

Cold/warm start is blank for our project’s performance tab.


I spent some time poking around the sentry-cocoa iOS pod and can see that app start logging is enabled. However there are many cases where if the hybrid SDK is enabled, it returns early. Comments suggest that the hybrid SDK (which I assume would be this library) will handle cold/warm start metrics. However I can’t find any references to cold/warm in this library.

I’m not sure how all of this is supposed to work. After modifying some code and putting breakpoints in locally (also enabling logging on dev builds), I’m seeing some numbers but this is clearly from my debugging (30+ seconds of cold start, ha):

Screen Shot 2021-09-03 at 2 07 11 PM

We have no cold/warm start traces from testers at all, all of our other automatic logging is working.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jennmuengcommented, Sep 8, 2021

@rnystrom App start measurements should be attached to transactions with op: "ui.load". So I would sample those if you are looking to enable traces one-by-one in tracesSampler.

1reaction
rnystromcommented, Sep 3, 2021

Actually may have solved this accidentally by enabling 100% sampling for navigation events.

tracesSampler: (context) => {
  switch (context.transactionContext.op) {
    case "navigation":
      return 1;
    default:
      // disable unexpected trace logging
      return 0;
  }
},

Is that how this works?

Read more comments on GitHub >

github_iconTop Results From Across the Web

App startup time - Android Developers
App startup time ; Understand the different app startup states. Cold start; Warm start; Hot start ; Use metrics to detect and diagnose...
Read more >
Understanding Cold, Hot, and Warm App Launch Time
A cold start refers to an app's starting from scratch. This means that the app's process has not been created by the system...
Read more >
Monitor Lambda cold start durations with CloudWatch - Lumigo
Record AWS Lambda cold start duration metrics to CloudWatch with this update to the async-custom-metrics SAR app from Yan Cui (The Burning ...
Read more >
Serverless Inference - Amazon SageMaker
To monitor how long your cold start time is, you can use the Amazon CloudWatch metric ModelSetupTime to monitor your serverless endpoint. This...
Read more >
Mobile Vitals - Sentry Documentation
The definitions of cold start and warm start change slightly depending on the operating system. On iOS, Apple recommends your app take at...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found