Skip to content

Need to re-initialize the sdk when versionSuffix changesΒ #850

@diegodorado

Description

@diegodorado

Feature description

When a user downloads an OTA update (a jsbundle), we do not fully restart the app (as it would be way slower).
We instead call the native side for a js bundle reload.

The issue we are facing is that the datadog initialize method, because already initialized when the app started, will skip the call to initialize after bundle js swap.

To clarify the process, this is happening:

  1. App starts
  2. jsbundle#111 is loaded
  3. datadog initialize is called with versionSuffix=111
  4. then, an OTA update is received
  5. jsbundle#112 is loaded (without a native app restart)
  6. datadog initialize is called with versionSuffix=112

that last call gets omitted... and the sdk interface does not offer any method to re initialize.

I was about to make a patch for the js side of the library, but it looks like it is a bit more involved, as the swift/kotlin implementations are also prepared for a single time initialization.

Is there a workaround for this?
Thanks

Proposed solution

No response

Other relevant information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions