From 6e4927c8f1b4afa5c9fc4cab08ec30ec14b0b656 Mon Sep 17 00:00:00 2001 From: Roman Zavarnitsyn Date: Mon, 16 Sep 2024 17:42:57 +0200 Subject: [PATCH 1/8] WIP --- CONTRIBUTING.md | 2 +- .../io/sentry/react/RNSentryModuleImpl.java | 29 ++++++++++++------- .../java/io/sentry/react/RNSentryModule.java | 4 +-- .../java/io/sentry/react/RNSentryModule.java | 4 +-- ios/RNSentry.mm | 10 +++++-- samples/react-native/Gemfile | 2 +- samples/react-native/Gemfile.lock | 4 +-- samples/react-native/src/App.tsx | 1 + src/js/NativeRNSentry.ts | 2 +- src/js/profiling/integration.ts | 23 ++++++++++++--- src/js/wrapper.ts | 6 ++-- 11 files changed, 57 insertions(+), 30 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e43b2c4da..7a8fb9fc9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -54,7 +54,7 @@ For android switch `newArchEnabled` to `false` in [android/gradle.properties](ht yarn pod-install-legacy yarn run-ios -yarn run-android +yarn run-androi # Release builds yarn pod-install-legacy-production diff --git a/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java b/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java index 2631cf715..e72549f03 100644 --- a/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +++ b/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java @@ -718,15 +718,17 @@ private void initializeAndroidProfiler() { ); } - public WritableMap startProfiling() { + public WritableMap startProfiling(boolean platformProfilers) { final WritableMap result = new WritableNativeMap(); - if (androidProfiler == null) { + if (androidProfiler == null && platformProfilers) { initializeAndroidProfiler(); } try { HermesSamplingProfiler.enable(); - androidProfiler.start(); + if (androidProfiler != null) { + androidProfiler.start(); + } result.putBoolean("started", true); } catch (Throwable e) { @@ -741,7 +743,10 @@ public WritableMap stopProfiling() { final WritableMap result = new WritableNativeMap(); File output = null; try { - AndroidProfiler.ProfileEndData end = androidProfiler.endAndCollect(false, null); + AndroidProfiler.ProfileEndData end = null; + if (androidProfiler != null) { + end = androidProfiler.endAndCollect(false, null); + } HermesSamplingProfiler.disable(); output = File.createTempFile( @@ -753,14 +758,16 @@ public WritableMap stopProfiling() { HermesSamplingProfiler.dumpSampledTraceToFile(output.getPath()); result.putString("profile", readStringFromFile(output)); - WritableMap androidProfile = new WritableNativeMap(); - byte[] androidProfileBytes = FileUtils.readBytesFromFile(end.traceFile.getPath(), maxTraceFileSize); - String base64AndroidProfile = Base64.encodeToString(androidProfileBytes, NO_WRAP | NO_PADDING); + if (end != null) { + WritableMap androidProfile = new WritableNativeMap(); + byte[] androidProfileBytes = FileUtils.readBytesFromFile(end.traceFile.getPath(), maxTraceFileSize); + String base64AndroidProfile = Base64.encodeToString(androidProfileBytes, NO_WRAP | NO_PADDING); - androidProfile.putString("sampled_profile", base64AndroidProfile); - androidProfile.putInt("android_api_level", buildInfo.getSdkInfoVersion()); - androidProfile.putString("build_id", getProguardUuid()); - result.putMap("androidProfile", androidProfile); + androidProfile.putString("sampled_profile", base64AndroidProfile); + androidProfile.putInt("android_api_level", buildInfo.getSdkInfoVersion()); + androidProfile.putString("build_id", getProguardUuid()); + result.putMap("androidProfile", androidProfile); + } } catch (Throwable e) { result.putString("error", e.toString()); } finally { diff --git a/android/src/newarch/java/io/sentry/react/RNSentryModule.java b/android/src/newarch/java/io/sentry/react/RNSentryModule.java index f5f6ea608..fd5b902e5 100644 --- a/android/src/newarch/java/io/sentry/react/RNSentryModule.java +++ b/android/src/newarch/java/io/sentry/react/RNSentryModule.java @@ -139,8 +139,8 @@ public void fetchNativeSdkInfo(Promise promise) { } @Override - public WritableMap startProfiling() { - return this.impl.startProfiling(); + public WritableMap startProfiling(boolean platformProfilers) { + return this.impl.startProfiling(platformProfilers); } @Override diff --git a/android/src/oldarch/java/io/sentry/react/RNSentryModule.java b/android/src/oldarch/java/io/sentry/react/RNSentryModule.java index 656b8c604..6b135ecb9 100644 --- a/android/src/oldarch/java/io/sentry/react/RNSentryModule.java +++ b/android/src/oldarch/java/io/sentry/react/RNSentryModule.java @@ -139,8 +139,8 @@ public void fetchNativeSdkInfo(Promise promise) { } @ReactMethod(isBlockingSynchronousMethod = true) - public WritableMap startProfiling() { - return this.impl.startProfiling(); + public WritableMap startProfiling(boolean platformProfilers) { + return this.impl.startProfiling(platformProfilers); } @ReactMethod(isBlockingSynchronousMethod = true) diff --git a/ios/RNSentry.mm b/ios/RNSentry.mm index 392869cad..1ff85705f 100644 --- a/ios/RNSentry.mm +++ b/ios/RNSentry.mm @@ -649,18 +649,22 @@ - (NSDictionary*) fetchNativeStackFramesBy: (NSArray*)instructionsAdd static SentryId* nativeProfileTraceId = nil; static uint64_t nativeProfileStartTime = 0; -RCT_EXPORT_SYNCHRONOUS_TYPED_METHOD(NSDictionary *, startProfiling) +RCT_EXPORT_SYNCHRONOUS_TYPED_METHOD(NSDictionary *, startProfiling: (BOOL)platformProfilers) { #if SENTRY_PROFILING_ENABLED try { facebook::hermes::HermesRuntime::enableSamplingProfiler(); - if (nativeProfileTraceId == nil && nativeProfileStartTime == 0) { + if (nativeProfileTraceId == nil && nativeProfileStartTime == 0 && platformProfilers) { #if SENTRY_TARGET_PROFILING_SUPPORTED nativeProfileTraceId = [RNSentryId newId]; nativeProfileStartTime = [PrivateSentrySDKOnly startProfilerForTrace: nativeProfileTraceId]; #endif } else { - NSLog(@"Native profiling already in progress. Currently existing trace: %@", nativeProfileTraceId); + if (!platformProfilers) { + NSLog(@"Native profiling is disabled. Only starting Hermes profiling."); + } else { + NSLog(@"Native profiling already in progress. Currently existing trace: %@", nativeProfileTraceId); + } } return @{ @"started": @YES }; } catch (const std::exception& ex) { diff --git a/samples/react-native/Gemfile b/samples/react-native/Gemfile index 0d169634b..f34e382f0 100644 --- a/samples/react-native/Gemfile +++ b/samples/react-native/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version -ruby "3.3.0" +ruby "3.3.5" gem 'cocoapods', '1.15.2' gem 'activesupport', '>= 6.1.7.5', '< 7.1.0' diff --git a/samples/react-native/Gemfile.lock b/samples/react-native/Gemfile.lock index 40d4693c8..50d115fe4 100644 --- a/samples/react-native/Gemfile.lock +++ b/samples/react-native/Gemfile.lock @@ -278,7 +278,7 @@ DEPENDENCIES fastlane (= 2.220.0) RUBY VERSION - ruby 3.3.0p0 + ruby 3.3.5p100 BUNDLED WITH - 2.4.20 + 2.5.18 diff --git a/samples/react-native/src/App.tsx b/samples/react-native/src/App.tsx index 31b3b89e1..9c8b825c2 100644 --- a/samples/react-native/src/App.tsx +++ b/samples/react-native/src/App.tsx @@ -96,6 +96,7 @@ Sentry.init({ maskAllVectors: true, // maskAllText: false, }), + Sentry.hermesProfilingIntegration({platformProfilers: true}) ); return integrations.filter(i => i.name !== 'Dedupe'); }, diff --git a/src/js/NativeRNSentry.ts b/src/js/NativeRNSentry.ts index 696059f68..a5a7652fb 100644 --- a/src/js/NativeRNSentry.ts +++ b/src/js/NativeRNSentry.ts @@ -34,7 +34,7 @@ export interface Spec extends TurboModule { enableNativeFramesTracking(): void; fetchModules(): Promise; fetchViewHierarchy(): Promise; - startProfiling(): { started?: boolean; error?: string }; + startProfiling(platformProfilers: boolean): { started?: boolean; error?: string }; stopProfiling(): { profile?: string; nativeProfile?: UnsafeObject; diff --git a/src/js/profiling/integration.ts b/src/js/profiling/integration.ts index 9fd2d0a0e..030e992bb 100644 --- a/src/js/profiling/integration.ts +++ b/src/js/profiling/integration.ts @@ -6,6 +6,7 @@ import type { Integration, IntegrationClass, IntegrationFn, + IntegrationFnResult, ThreadCpuProfile, Transaction, } from '@sentry/types'; @@ -31,12 +32,25 @@ const INTEGRATION_NAME = 'HermesProfiling'; const MS_TO_NS: number = 1e6; +export interface HermesProfilingOptions { + /** + * Enable or disable profiling of native (iOS and Android) threads + * + * @default true + */ + platformProfilers?: boolean; +} + +const defaultOptions: Required = { + platformProfilers: true, +}; + /** * Profiling integration creates a profile for each transaction and adds it to the event envelope. * * @experimental */ -export const hermesProfilingIntegration: IntegrationFn = () => { +export const hermesProfilingIntegration = (initOptions: HermesProfilingOptions = defaultOptions): IntegrationFnResult => { let _currentProfile: | { profile_id: string; @@ -44,6 +58,7 @@ export const hermesProfilingIntegration: IntegrationFn = () => { } | undefined; let _currentProfileTimeout: number | undefined; + const usePlatformProfilers = initOptions.platformProfilers ?? true; const setupOnce = (): void => { if (!isHermesEnabled()) { @@ -138,7 +153,7 @@ export const hermesProfilingIntegration: IntegrationFn = () => { * Starts a new profile and links it to the transaction. */ const _startNewProfile = (transaction: Transaction): void => { - const profileStartTimestampNs = startProfiling(); + const profileStartTimestampNs = startProfiling(usePlatformProfilers); if (!profileStartTimestampNs) { return; } @@ -227,8 +242,8 @@ export const HermesProfiling = convertIntegrationFnToClass( /** * Starts Profilers and returns the timestamp when profiling started in nanoseconds. */ -export function startProfiling(): number | null { - const started = NATIVE.startProfiling(); +export function startProfiling(platformProfilers: boolean): number | null { + const started = NATIVE.startProfiling(platformProfilers); if (!started) { return null; } diff --git a/src/js/wrapper.ts b/src/js/wrapper.ts index 164d955a9..ed1bd7d1f 100644 --- a/src/js/wrapper.ts +++ b/src/js/wrapper.ts @@ -95,7 +95,7 @@ interface SentryNativeWrapper { fetchModules(): Promise | null>; fetchViewHierarchy(): PromiseLike; - startProfiling(): boolean; + startProfiling(platformProfilers: boolean): boolean; stopProfiling(): { hermesProfile: Hermes.Profile; nativeProfile?: NativeProfileEvent; @@ -531,7 +531,7 @@ export const NATIVE: SentryNativeWrapper = { return raw ? new Uint8Array(raw) : null; }, - startProfiling(): boolean { + startProfiling(platformProfilers: boolean): boolean { if (!this.enableNative) { throw this._DisabledNativeError; } @@ -539,7 +539,7 @@ export const NATIVE: SentryNativeWrapper = { throw this._NativeClientError; } - const { started, error } = RNSentry.startProfiling(); + const { started, error } = RNSentry.startProfiling(platformProfilers); if (started) { logger.log('[NATIVE] Start Profiling'); } else { From 9d63762f1d1cf7693a290637127a16766bd50e50 Mon Sep 17 00:00:00 2001 From: Roman Zavarnitsyn Date: Mon, 16 Sep 2024 18:12:03 +0200 Subject: [PATCH 2/8] Remove redundancy --- samples/react-native/src/App.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/samples/react-native/src/App.tsx b/samples/react-native/src/App.tsx index 9c8b825c2..31b3b89e1 100644 --- a/samples/react-native/src/App.tsx +++ b/samples/react-native/src/App.tsx @@ -96,7 +96,6 @@ Sentry.init({ maskAllVectors: true, // maskAllText: false, }), - Sentry.hermesProfilingIntegration({platformProfilers: true}) ); return integrations.filter(i => i.name !== 'Dedupe'); }, From a50d2a8267832cad8bb0344138362b62c0e144d4 Mon Sep 17 00:00:00 2001 From: Roman Zavarnitsyn Date: Mon, 16 Sep 2024 18:44:48 +0200 Subject: [PATCH 3/8] Revert and add test --- CONTRIBUTING.md | 2 +- samples/react-native/Gemfile | 2 +- samples/react-native/Gemfile.lock | 4 ++-- .../project.pbxproj | 6 ++++-- test/profiling/integration.test.ts | 18 ++++++++++++++++++ test/wrapper.test.ts | 4 ++-- 6 files changed, 28 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7a8fb9fc9..e43b2c4da 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -54,7 +54,7 @@ For android switch `newArchEnabled` to `false` in [android/gradle.properties](ht yarn pod-install-legacy yarn run-ios -yarn run-androi +yarn run-android # Release builds yarn pod-install-legacy-production diff --git a/samples/react-native/Gemfile b/samples/react-native/Gemfile index f34e382f0..0d169634b 100644 --- a/samples/react-native/Gemfile +++ b/samples/react-native/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version -ruby "3.3.5" +ruby "3.3.0" gem 'cocoapods', '1.15.2' gem 'activesupport', '>= 6.1.7.5', '< 7.1.0' diff --git a/samples/react-native/Gemfile.lock b/samples/react-native/Gemfile.lock index 50d115fe4..40d4693c8 100644 --- a/samples/react-native/Gemfile.lock +++ b/samples/react-native/Gemfile.lock @@ -278,7 +278,7 @@ DEPENDENCIES fastlane (= 2.220.0) RUBY VERSION - ruby 3.3.5p100 + ruby 3.3.0p0 BUNDLED WITH - 2.5.18 + 2.4.20 diff --git a/samples/react-native/ios/sentryreactnativesample.xcodeproj/project.pbxproj b/samples/react-native/ios/sentryreactnativesample.xcodeproj/project.pbxproj index 7e2bd5a16..7475b94b4 100644 --- a/samples/react-native/ios/sentryreactnativesample.xcodeproj/project.pbxproj +++ b/samples/react-native/ios/sentryreactnativesample.xcodeproj/project.pbxproj @@ -632,13 +632,14 @@ ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ( "$(inherited)", - " ", + "-DRN_FABRIC_ENABLED", ); OTHER_CPLUSPLUSFLAGS = ( "$(OTHER_CFLAGS)", "-DFOLLY_NO_CONFIG", "-DFOLLY_MOBILE=1", "-DFOLLY_USE_LIBCPP=1", + "-DRN_FABRIC_ENABLED", ); OTHER_LDFLAGS = "$(inherited)"; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; @@ -714,13 +715,14 @@ MTL_ENABLE_DEBUG_INFO = NO; OTHER_CFLAGS = ( "$(inherited)", - " ", + "-DRN_FABRIC_ENABLED", ); OTHER_CPLUSPLUSFLAGS = ( "$(OTHER_CFLAGS)", "-DFOLLY_NO_CONFIG", "-DFOLLY_MOBILE=1", "-DFOLLY_USE_LIBCPP=1", + "-DRN_FABRIC_ENABLED", ); OTHER_LDFLAGS = "$(inherited)"; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; diff --git a/test/profiling/integration.test.ts b/test/profiling/integration.test.ts index 2a8003c49..e17109cbf 100644 --- a/test/profiling/integration.test.ts +++ b/test/profiling/integration.test.ts @@ -351,6 +351,24 @@ describe('profiling integration', () => { jest.runAllTimers(); }); }); + + test('platformProviders flag passed down to native', () => { + mock = initTestClient({ withProfiling: false }); + jest.runAllTimers(); + jest.clearAllMocks(); + + const transaction: Transaction = Sentry.startTransaction({ + name: 'test-name', + }); + getCurrentHub().getScope()?.setSpan(transaction); + + getCurrentHub().getClient()?.addIntegration?.(hermesProfilingIntegration({platformProfilers: false})); + + transaction.finish(); + jest.runAllTimers(); + + expect(mockWrapper.NATIVE.startProfiling).toBeCalledWith(false); + }); }); function initTestClient( diff --git a/test/wrapper.test.ts b/test/wrapper.test.ts index 884fd1a83..2e06ed5c8 100644 --- a/test/wrapper.test.ts +++ b/test/wrapper.test.ts @@ -574,13 +574,13 @@ describe('Tests Native Wrapper', () => { (RNSentry.startProfiling as jest.MockedFunction).mockReturnValue({ started: true, }); - expect(NATIVE.startProfiling()).toBe(true); + expect(NATIVE.startProfiling(true)).toBe(true); }); test('failed start profiling returns false', () => { (RNSentry.startProfiling as jest.MockedFunction).mockReturnValue({ error: 'error', }); - expect(NATIVE.startProfiling()).toBe(false); + expect(NATIVE.startProfiling(true)).toBe(false); }); test('stop profiling returns hermes profile', () => { (RNSentry.stopProfiling as jest.MockedFunction).mockReturnValue({ From 1f98765d30ad35f3a62f89069d5bef4d626e8936 Mon Sep 17 00:00:00 2001 From: Roman Zavarnitsyn Date: Mon, 16 Sep 2024 18:46:47 +0200 Subject: [PATCH 4/8] prettier --- src/js/profiling/integration.ts | 5 +++-- test/profiling/integration.test.ts | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/js/profiling/integration.ts b/src/js/profiling/integration.ts index 030e992bb..79b34a141 100644 --- a/src/js/profiling/integration.ts +++ b/src/js/profiling/integration.ts @@ -5,7 +5,6 @@ import type { Event, Integration, IntegrationClass, - IntegrationFn, IntegrationFnResult, ThreadCpuProfile, Transaction, @@ -50,7 +49,9 @@ const defaultOptions: Required = { * * @experimental */ -export const hermesProfilingIntegration = (initOptions: HermesProfilingOptions = defaultOptions): IntegrationFnResult => { +export const hermesProfilingIntegration = ( + initOptions: HermesProfilingOptions = defaultOptions, +): IntegrationFnResult => { let _currentProfile: | { profile_id: string; diff --git a/test/profiling/integration.test.ts b/test/profiling/integration.test.ts index e17109cbf..cc4251af0 100644 --- a/test/profiling/integration.test.ts +++ b/test/profiling/integration.test.ts @@ -362,7 +362,9 @@ describe('profiling integration', () => { }); getCurrentHub().getScope()?.setSpan(transaction); - getCurrentHub().getClient()?.addIntegration?.(hermesProfilingIntegration({platformProfilers: false})); + getCurrentHub() + .getClient() + ?.addIntegration?.(hermesProfilingIntegration({ platformProfilers: false })); transaction.finish(); jest.runAllTimers(); From f64fc9119d60d145218f84eddfecbffbbe964744 Mon Sep 17 00:00:00 2001 From: Roman Zavarnitsyn Date: Mon, 16 Sep 2024 23:09:28 +0200 Subject: [PATCH 5/8] Changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b01d372b..1da16cb1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Features + +- Add an option to disable native (iOS and Android) profiling for the `HermesProfiling` integration ([#4094](https://github.com/getsentry/sentry-react-native/pull/4094)) + ## 5.32.0 ### Features From 841d5b70f133984afd61fb71188c5aeeaa7ab32b Mon Sep 17 00:00:00 2001 From: Roman Zavarnitsyn Date: Tue, 17 Sep 2024 12:19:27 +0200 Subject: [PATCH 6/8] fix test --- test/profiling/integration.test.ts | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/test/profiling/integration.test.ts b/test/profiling/integration.test.ts index cc4251af0..b3418446a 100644 --- a/test/profiling/integration.test.ts +++ b/test/profiling/integration.test.ts @@ -9,7 +9,7 @@ import type { Envelope, Event, Profile, ThreadCpuProfile, Transaction, Transport import * as Sentry from '../../src/js'; import type { NativeDeviceContextsResponse } from '../../src/js/NativeRNSentry'; import { getDebugMetadata } from '../../src/js/profiling/debugid'; -import { hermesProfilingIntegration } from '../../src/js/profiling/integration'; +import { hermesProfilingIntegration, HermesProfilingOptions } from '../../src/js/profiling/integration'; import type { AndroidProfileEvent } from '../../src/js/profiling/types'; import { getDefaultEnvironment, isHermesEnabled, notWeb } from '../../src/js/utils/environment'; import { RN_GLOBAL_OBJ } from '../../src/js/utils/worldwide'; @@ -353,19 +353,10 @@ describe('profiling integration', () => { }); test('platformProviders flag passed down to native', () => { - mock = initTestClient({ withProfiling: false }); - jest.runAllTimers(); - jest.clearAllMocks(); - + mock = initTestClient({ withProfiling: true, hermesProfilingOptions: { platformProfilers: false } }); const transaction: Transaction = Sentry.startTransaction({ name: 'test-name', }); - getCurrentHub().getScope()?.setSpan(transaction); - - getCurrentHub() - .getClient() - ?.addIntegration?.(hermesProfilingIntegration({ platformProfilers: false })); - transaction.finish(); jest.runAllTimers(); @@ -377,6 +368,7 @@ function initTestClient( testOptions: { withProfiling?: boolean; environment?: string; + hermesProfilingOptions?: HermesProfilingOptions; } = { withProfiling: true, }, @@ -392,6 +384,12 @@ function initTestClient( if (!testOptions.withProfiling) { return integrations.filter(i => i.name !== 'HermesProfiling'); } + return integrations.map(integration => { + if (integration.name === 'HermesProfiling') { + return hermesProfilingIntegration(testOptions.hermesProfilingOptions ?? {}); + } + return integration; + }); return integrations; }, transport: () => ({ From 8fcfaeac412c8148ddee398f660f770dfada0eaf Mon Sep 17 00:00:00 2001 From: Roman Zavarnitsyn Date: Tue, 17 Sep 2024 12:29:54 +0200 Subject: [PATCH 7/8] Changelog example --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1da16cb1f..242e17861 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,18 @@ - Add an option to disable native (iOS and Android) profiling for the `HermesProfiling` integration ([#4094](https://github.com/getsentry/sentry-react-native/pull/4094)) + To disable native profilers add the `hermesProfilingIntegration`. + + ```js + import * as Sentry from '@sentry/react-native'; + + Sentry.init({ + integrations: [ + Sentry.hermesProfilingIntegration({ platformProfilers: false }), + ], + }); + ``` + ## 5.32.0 ### Features From 5820d73004e97d032a81ddecba439d2b4f39dccc Mon Sep 17 00:00:00 2001 From: Roman Zavarnitsyn Date: Tue, 17 Sep 2024 12:38:54 +0200 Subject: [PATCH 8/8] Fix eslint --- test/profiling/integration.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/profiling/integration.test.ts b/test/profiling/integration.test.ts index b3418446a..b5ae1e4a8 100644 --- a/test/profiling/integration.test.ts +++ b/test/profiling/integration.test.ts @@ -9,7 +9,8 @@ import type { Envelope, Event, Profile, ThreadCpuProfile, Transaction, Transport import * as Sentry from '../../src/js'; import type { NativeDeviceContextsResponse } from '../../src/js/NativeRNSentry'; import { getDebugMetadata } from '../../src/js/profiling/debugid'; -import { hermesProfilingIntegration, HermesProfilingOptions } from '../../src/js/profiling/integration'; +import type { HermesProfilingOptions } from '../../src/js/profiling/integration'; +import { hermesProfilingIntegration } from '../../src/js/profiling/integration'; import type { AndroidProfileEvent } from '../../src/js/profiling/types'; import { getDefaultEnvironment, isHermesEnabled, notWeb } from '../../src/js/utils/environment'; import { RN_GLOBAL_OBJ } from '../../src/js/utils/worldwide';