Describe what happened
Usually Datadog will trigger application_start action event at first.
But when AddLongTask event was triggered as a first RUM event, application_start action event won't be triggered.
Steps to reproduce the issue:
Trigger any AddLongTask quickly when just Datadog initialized.
Sample: ken-kentan#2
Describe what you expected:
application_start action event should be triggered even if the first RUM event was AddLongTask.
I investigated around RumSessionScope and found than when AddLongTask event was triggered as a first event, sessionState was changed to State.EXPIRED, then RumSessionScope::handleEvent passed noOpWriter as an actualWriter for ApplicationStarted event.
I guess sessionState shouldn't be State.EXPIRED in this case.
Additional context
- Android OS version: N/A
- Device Model: N/A
- Datadog SDK version: 1.19.0-2.0.0
- Versions of any other relevant dependencies (OkHttp, …): N/A
- Proguard configuration: N/A
- Gradle Plugins: N/A
Note: This issue might be same with #1523
Describe what happened
Usually Datadog will trigger
application_startaction event at first.But when
AddLongTaskevent was triggered as a first RUM event,application_startaction event won't be triggered.Steps to reproduce the issue:
Trigger any
AddLongTaskquickly when just Datadog initialized.Sample: ken-kentan#2
Describe what you expected:
application_startaction event should be triggered even if the first RUM event wasAddLongTask.I investigated around
RumSessionScopeand found than whenAddLongTaskevent was triggered as a first event,sessionStatewas changed toState.EXPIRED, thenRumSessionScope::handleEventpassednoOpWriteras anactualWriterforApplicationStartedevent.I guess
sessionStateshouldn't beState.EXPIREDin this case.Additional context
Note: This issue might be same with #1523