Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { InternalLog } from '../../../InternalLog';
import { SdkVerbosity } from '../../../SdkVerbosity';
import DdNativeRum from '../../../specs/NativeDdRum';
import DdSdk from '../../../specs/NativeDdSdk';
import { getBabelTelemetryConfig } from '../../../utils/telemetry';
import { DefaultTimeProvider } from '../../../utils/time-provider/DefaultTimeProvider';
import type { TimeProvider } from '../../../utils/time-provider/TimeProvider';
import { BABEL_PLUGIN_TELEMETRY } from '../../constants';
Expand Down Expand Up @@ -65,6 +64,16 @@ export class DdBabelInteractionTracking {
return DdBabelInteractionTracking.instance;
}

static getTelemetryConfig() {
return {
babel_plugin: {
enabled: !!globalThis.__DD_RN_BABEL_PLUGIN_ENABLED__,
track_interactions: !!DdBabelInteractionTracking.config
.trackInteractions
}
};
}

private getTargetName(targetObject: TargetObject) {
const {
getContent,
Expand Down Expand Up @@ -129,7 +138,7 @@ export class DdBabelInteractionTracking {
if (!this.telemetrySent) {
DdSdk?.sendTelemetryLog(
BABEL_PLUGIN_TELEMETRY,
getBabelTelemetryConfig(),
DdBabelInteractionTracking.getTelemetryConfig(),
{ onlyOnce: true }
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import { InternalLog } from '../../../InternalLog';
import { SdkVerbosity } from '../../../SdkVerbosity';
import { DdSdk } from '../../../sdk/DdSdk';
import { getErrorMessage } from '../../../utils/errorUtils';
import { getBabelTelemetryConfig } from '../../../utils/telemetry';
import { BABEL_PLUGIN_TELEMETRY } from '../../constants';

import { DdBabelInteractionTracking } from './DdBabelInteractionTracking';
import type { DdEventsInterceptorOptions } from './DdEventsInterceptor';
import { DdEventsInterceptor } from './DdEventsInterceptor';
import type { EventsInterceptor } from './EventsInterceptor';
Expand Down Expand Up @@ -74,7 +74,7 @@ export class DdRumUserInteractionTracking {

DdSdk?.sendTelemetryLog(
BABEL_PLUGIN_TELEMETRY,
getBabelTelemetryConfig(),
DdBabelInteractionTracking.getTelemetryConfig(),
{ onlyOnce: true }
);

Expand Down
17 changes: 0 additions & 17 deletions packages/core/src/utils/telemetry.ts

This file was deleted.

Loading