DataDog/browser-sdk

๐Ÿ™ My support need

RaudByorn opened this issue ยท 3 comments

What are you trying to achieve and what is your issue? Please describe.
datadog/browser-rum version: 5.22.0
I have a Nuxt project and I want to record session replays. I created nuxt plugin 'datadog.client.ts'

My config is

  datadogRum.init({
    applicationId: DATADOG_APPLICATION_ID,
    clientToken: DATADOG_CLIENT_TOKEN,
    site: DATADOG_SITE,
    service: DATADOG_SERVICE,
    version: appVersion,
    sessionSampleRate: 100,
    sessionReplaySampleRate: 100,
    startSessionReplayRecordingManually: true,
    trackViewsManually: true,
    trackUserInteractions: true,
    defaultPrivacyLevel: 'mask',
  })
  
  datadogRum.startSessionReplayRecording()

The recording doesn't start when I trigger that inside plugin, other than that everything works as it should.
When I try to start it somewhere else it works.

Describe the solution you'd like
I want to trigger recording inside of my plugin after datadog-rum initialization.

Describe alternatives you've considered
when I change config to start recording automatically

    startSessionReplayRecordingManually: false,

it starts recording.

Hello @RaudByorn,

To help troubleshoot your SDK setup, you can use datadogRum._setDebug(true) to have errors generated by the SDK printed in the console. You can also use the browser SDK Chrome extension, which allows you to view if the configuration is applied as expected, see which RUM events are sent, and also view the recordings.

If this does not help, can you provide a minimal reproducible example?

Hello @amortemousque
Thanks for the feedback, but unfortunately it didn't help. I can't see any errors, so I think everything is work as expected.
But I'm not able to start recording manually right after datadogRum.init()

About reproduction: it's just simple Nuxt application, and I configure datadog by guide in Nuxt plugin as I described in init comment.

Hi @RaudByorn,
Thank you for updating with us. Could you try to comment out trackViewsManually: true or set it to false and see if the manual recording works on your side? It could be due to no initial view was set (troubleshooting doc).