Flagsmith / flagsmith-js-client

Javascript Client for Flagsmith. Ship features with confidence using feature flags and remote config. Host yourself or use our hosted version at https://www.flagsmith.com/
https://www.flagsmith.com/
BSD 3-Clause "New" or "Revised" License
60 stars 38 forks source link

Provide explicit setter functions for Data Dog / Dynatrace #181

Closed kyle-ssg closed 1 month ago

kyle-ssg commented 1 year ago

In an SSR based application we cannot initialise and track RUM events on the server, this means that when the client hydrates we are not calling the corresponding dtrum and datadogrum functions, see https://github.com/Flagsmith/flagsmith-js-client/blob/main/flagsmith-core.ts#L171

We should separate the above out into functions setDtrum and setDatadogRum so they can be called when mounting the frontend in frameworks such as Next.js

novakzaballa commented 1 year ago

@kyle-ssg are there any specifics and details you can add as well as acceptance criteria, so I can address this request? For example: Is there any existing DataDog example integration that I could use to test the integration with a SSR NextJS app?

kyle-ssg commented 1 month ago

This is no longer an issue