What's a user session in Firebase Crashlytics Event Report?
Asked Answered
Y

2

0

When Firebase Crashlytics tags a crash event with "Happened in the first second of the User's session".

One obvious scenario is when the user clicks the App icon and the app crashed within 1 second.

Could this also mean, When the user has put the App in the background and gets back on it Later?

I think It might include the scenarios when the system had cleared all the activities while in the background, and getting back on it restarts the activity it was previously visible.

Any reference to documentation will also one helpful.

first second of the user's session

Yu answered 4/4, 2023 at 13:44 Comment(0)
M
1

Why look at documentation when we can look at the actual code :) Here's the class that Crashlytics uses for managing Sessions, and it says:

This will happen at a cold start of the app, and when the app has been in the background for a period of time (default 30 min) and then comes back to the foreground.

Looking further, this timeout can be configured remotely through your Firebase settings as well as locally:

  /** Background timeout config value before which a new session is generated. */
  val sessionRestartTimeout: Duration
    get() {
      localOverrideSettings.sessionRestartTimeout?.let {
        if (isValidSessionRestartTimeout(it)) {
          return it
        }
      }
      remoteSettings.sessionRestartTimeout?.let {
        if (isValidSessionRestartTimeout(it)) {
          return it
        }
      }
      // SDK Default
      return 30.minutes
    }

And finally, this is the documentation from Google Analytics, which I presume, should be identical to Crashlytics, and describes roughly the same behavior as can be seen from the Crashlytics' sources.

Millner answered 12/8, 2023 at 14:10 Comment(0)
P
0

I think you can try to induce a crash in the onRestart of a test application which has crashlytics enabled and then see if that is the case. I tried to search for documentation about this a little but I didn't find anything useful.

Paten answered 9/8, 2023 at 12:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.