File tree Expand file tree Collapse file tree
rum/instrumentation/interactionTracking Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ import { InternalLog } from '../../../InternalLog';
88import { SdkVerbosity } from '../../../SdkVerbosity' ;
99import DdNativeRum from '../../../specs/NativeDdRum' ;
1010import DdSdk from '../../../specs/NativeDdSdk' ;
11- import { getBabelTelemetryConfig } from '../../../utils/telemetry' ;
1211import { DefaultTimeProvider } from '../../../utils/time-provider/DefaultTimeProvider' ;
1312import type { TimeProvider } from '../../../utils/time-provider/TimeProvider' ;
1413import { BABEL_PLUGIN_TELEMETRY } from '../../constants' ;
@@ -65,6 +64,16 @@ export class DdBabelInteractionTracking {
6564 return DdBabelInteractionTracking . instance ;
6665 }
6766
67+ static getTelemetryConfig ( ) {
68+ return {
69+ babel_plugin : {
70+ enabled : ! ! globalThis . __DD_RN_BABEL_PLUGIN_ENABLED__ ,
71+ track_interactions : ! ! DdBabelInteractionTracking . config
72+ . trackInteractions
73+ }
74+ } ;
75+ }
76+
6877 private getTargetName ( targetObject : TargetObject ) {
6978 const {
7079 getContent,
@@ -129,7 +138,7 @@ export class DdBabelInteractionTracking {
129138 if ( ! this . telemetrySent ) {
130139 DdSdk ?. sendTelemetryLog (
131140 BABEL_PLUGIN_TELEMETRY ,
132- getBabelTelemetryConfig ( ) ,
141+ DdBabelInteractionTracking . getTelemetryConfig ( ) ,
133142 { onlyOnce : true }
134143 ) ;
135144
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ import { InternalLog } from '../../../InternalLog';
1010import { SdkVerbosity } from '../../../SdkVerbosity' ;
1111import { DdSdk } from '../../../sdk/DdSdk' ;
1212import { getErrorMessage } from '../../../utils/errorUtils' ;
13- import { getBabelTelemetryConfig } from '../../../utils/telemetry' ;
1413import { BABEL_PLUGIN_TELEMETRY } from '../../constants' ;
1514
15+ import { DdBabelInteractionTracking } from './DdBabelInteractionTracking' ;
1616import type { DdEventsInterceptorOptions } from './DdEventsInterceptor' ;
1717import { DdEventsInterceptor } from './DdEventsInterceptor' ;
1818import type { EventsInterceptor } from './EventsInterceptor' ;
@@ -74,7 +74,7 @@ export class DdRumUserInteractionTracking {
7474
7575 DdSdk ?. sendTelemetryLog (
7676 BABEL_PLUGIN_TELEMETRY ,
77- getBabelTelemetryConfig ( ) ,
77+ DdBabelInteractionTracking . getTelemetryConfig ( ) ,
7878 { onlyOnce : true }
7979 ) ;
8080
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments