Skip to content

Commit

Permalink
Use turbomodules for telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
louiszawadzki committed Oct 25, 2023
1 parent 4d2dc9e commit 3162251
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2016-Present Datadog, Inc.
*/
import { NativeModules } from 'react-native';
import { NativeDdSdk } from '../NativeDdSdk';

export function formatAllowedHosts(allowedHosts?: string[]): string {
try {
return `'${JSON.stringify(allowedHosts)}'`;
} catch (e: any) {
if (NativeModules.DdSdk && NativeModules.DdSdk.telemetryError) {
NativeModules.DdSdk.telemetryError(
if (NativeDdSdk) {
NativeDdSdk.telemetryError(
getErrorMessage(e),
getErrorStackTrace(e),
'AllowedHostsError'
Expand Down

0 comments on commit 3162251

Please sign in to comment.