Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
May 21, 2022 09:53 am GMT

For those who have trouble setting up Datadog RUM

Introduction

If anyone has trouble setting up Datadog RUM, I would like to tell them, "The setup code for JS/NPM version has some incorrect." I have previously texted Datadog support about the feedback, but it has not been fixed, so I wrote it.
Setting page

1. Typo in the snippet

As you can see in the screenshot, a snippet is provided as a sample, but unfortunately, a typo has.
Sample Snipet

Look at line 3, the curly bracket { has been used, datadogRum.init({.
But the } never has been stated in the snippet.

Here is the collect snippet.

import { datadogRum } from '@datadog/browser-rum';datadogRum.init({    applicationId: 'hoge-hoge-hoge',    clientToken: 'hoge-hoge-hoge',    site: 'datadoghq.com',    service:'temp',    // Specify a version number to identify the deployed version of your application in Datadog     // version: '1.0.0',    sampleRate: 100,    replaySampleRate: 100,    trackInteractions: true,    defaultPrivacyLevel:'mask-user-input',});datadogRum.startSessionReplayRecording();

2. Disabled Session Replay

If you wanna disable session replay, you also have to be careful with this setup page. There is a toggle, Session Replay Enabled, which seems to allow the snippet to be edited to disable the function.
Image description

However, only this setting doesn't seem sufficient... You also must set replaySampleRate: 0

References

Set replaySampleRate to 0 to stop collecting the RUM Session Replay plan which includes replays, resources, and long tasks.

That's why here is the collect snippet!

import { datadogRum } from '@datadog/browser-rum';datadogRum.init({    applicationId: 'hoge-hoge-hoge-b2e3-40e049c84c81',    clientToken: 'hoge-hoge-hoge-881b380180c1171d17',    site: 'datadoghq.com',    service:'temp',    // Specify a version number to identify the deployed version of your application in Datadog     // version: '1.0.0',    sampleRate: 100,    replaySampleRate: 0,    trackInteractions: true,);

Happy Monitoring!


Original Link: https://dev.to/paprikamah/how-to-set-up-datadog-rum-3c66

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To