I am only starting on DataDog, and what I want to accomplish is adding a few data to the events that DD_RUM collects. More specifically, I would like to sent to datadog the entire event
object of any user triggered action from a React application. I had a look on beforeSend
(I wasn't able to add the event
to the payload). And I am aware that there is an addAction
api to send to DataDog custom actions, but I am looking for a solution that would work for any action.
My current DD configs on the react application:
datadogRum.init({
applicationId: 'my-app-id',
clientToken: 'my-token',
site: 'datadoghq.eu',
service:'react-datadog-poc',
env:'dev',
version: '1.0.0',
sessionSampleRate: 100,
sessionReplaySampleRate: 100,
trackUserInteractions: true,
forwardErrorsToLogs: true,
trackFrustrations: true,
trackResources: true,
trackLongTasks: true,
defaultPrivacyLevel:'allow'
});
datadogLogs.init({
clientToken: 'my-token',
site: 'datadoghq.eu',
forwardErrorsToLogs: true,
forwardConsoleLogs: "all",
forwardReports: "all",
sessionSampleRate: 100
});
datadogRum.startSessionReplayRecording();