Skip to content

application_start action event won't be called when AddLongTask event triggered as a first RUM event #1582

Description

@ken-kentan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions