microsoft / appcenter-sdk-android

Development repository for the App Center SDK for Android
Other
276 stars 134 forks source link

Custom events with session id 00000000-0000-0000-0000-000000000000 #1653

Closed pedrorgr closed 1 year ago

pedrorgr commented 1 year ago

Description

We exported analytics data from application insights and we have some custom events with session id = 00000000-0000-0000-0000-000000000000. Is this expected ? Isn't the 00000000-0000-0000-0000-000000000000 used for failure events?

Details

  1. Which SDK version are you using?
    • 3.0.0
  2. Which OS version did you experience the issue on?
    • Multiple versions
  3. What device version did you see this error on? Were you using an emulator or a physical device?
    • Multiple devices
DmitriyKirakosyan commented 1 year ago

Hi @pedrorgr , thank you for reaching out! May I know how you start AppCenter SDK? Do you use Analytics module? Please share the code snippet of your AC SDK initialization. This `00..' session id means there was no session id sent within the event. Can you try to update SDK to the latest version (currently 4.4.5) and check if it helps?

pedrorgr commented 1 year ago

Hi, thank you for the quick reply. We start the appcenter SDK like this: override fun startAppCenter() { AppCenter.start( application, application.getString(R.string.app_center_key), Analytics::class.java, Crashes::class.java ) }

startAppCenter() is called in onCreate method from the MainActivity. Do you think this could be the cause for this? We are also using AppCenter/Analytics for iOS and we don't see custom events with this id.

Could also explain the meaning of CorrelationId and InstallationId if possible? Thanks

DmitriyKirakosyan commented 1 year ago

Hi @pedrorgr , AppCenter SDK uses activity's onResume event as a starting point of a new session. If you call Analytics.TrackEvent before onResume is called, then your event will be sent without session id.

Does it answer your question?

DmitriyKirakosyan commented 1 year ago

Could also explain the meaning of CorrelationId and InstallationId if possible?

InstallId is set once the AppCenter initialized first time on the device, so basically it is one install id for every app installation. As for CorrelationId, there is no such property in SDK logs.

DmitriyKirakosyan commented 1 year ago

Closing, but feel free to reopen if you have any additional questions.