@sentry/react-native 7.10.0 → 7.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/android/libs/replay-stubs.jar +0 -0
  2. package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +33 -16
  3. package/android/src/main/java/io/sentry/react/RNSentryVersion.java +1 -1
  4. package/android/src/newarch/java/io/sentry/react/RNSentryModule.java +10 -0
  5. package/android/src/oldarch/java/io/sentry/react/RNSentryModule.java +15 -0
  6. package/dist/js/NativeRNSentry.d.ts +2 -0
  7. package/dist/js/NativeRNSentry.d.ts.map +1 -1
  8. package/dist/js/NativeRNSentry.js.map +1 -1
  9. package/dist/js/client.d.ts.map +1 -1
  10. package/dist/js/client.js +2 -2
  11. package/dist/js/client.js.map +1 -1
  12. package/dist/js/index.d.ts +2 -2
  13. package/dist/js/index.d.ts.map +1 -1
  14. package/dist/js/index.js +1 -1
  15. package/dist/js/index.js.map +1 -1
  16. package/dist/js/integrations/logEnricherIntegration.js +43 -3
  17. package/dist/js/integrations/logEnricherIntegration.js.map +1 -1
  18. package/dist/js/options.d.ts +18 -10
  19. package/dist/js/options.d.ts.map +1 -1
  20. package/dist/js/options.js.map +1 -1
  21. package/dist/js/scopeSync.d.ts.map +1 -1
  22. package/dist/js/scopeSync.js +27 -0
  23. package/dist/js/scopeSync.js.map +1 -1
  24. package/dist/js/touchevents.d.ts +8 -0
  25. package/dist/js/touchevents.d.ts.map +1 -1
  26. package/dist/js/touchevents.js +33 -1
  27. package/dist/js/touchevents.js.map +1 -1
  28. package/dist/js/tracing/expoRouter.d.ts +25 -0
  29. package/dist/js/tracing/expoRouter.d.ts.map +1 -0
  30. package/dist/js/tracing/expoRouter.js +73 -0
  31. package/dist/js/tracing/expoRouter.js.map +1 -0
  32. package/dist/js/tracing/index.d.ts +2 -0
  33. package/dist/js/tracing/index.d.ts.map +1 -1
  34. package/dist/js/tracing/index.js +1 -0
  35. package/dist/js/tracing/index.js.map +1 -1
  36. package/dist/js/tracing/origin.d.ts +1 -0
  37. package/dist/js/tracing/origin.d.ts.map +1 -1
  38. package/dist/js/tracing/origin.js +1 -0
  39. package/dist/js/tracing/origin.js.map +1 -1
  40. package/dist/js/tracing/reactnavigation.d.ts +9 -1
  41. package/dist/js/tracing/reactnavigation.d.ts.map +1 -1
  42. package/dist/js/tracing/reactnavigation.js +30 -1
  43. package/dist/js/tracing/reactnavigation.js.map +1 -1
  44. package/dist/js/version.d.ts +1 -1
  45. package/dist/js/version.js +1 -1
  46. package/dist/js/version.js.map +1 -1
  47. package/dist/js/wrapper.d.ts +6 -2
  48. package/dist/js/wrapper.d.ts.map +1 -1
  49. package/dist/js/wrapper.js +38 -4
  50. package/dist/js/wrapper.js.map +1 -1
  51. package/ios/RNSentry.mm +16 -0
  52. package/ios/RNSentryExperimentalOptions.h +8 -0
  53. package/ios/RNSentryExperimentalOptions.m +42 -0
  54. package/ios/RNSentryVersion.m +1 -1
  55. package/ios/SentrySDKWrapper.m +7 -0
  56. package/package.json +9 -9
  57. package/plugin/build/withSentryIOS.js +4 -0
  58. package/scripts/sentry-xcode-debug-files.sh +9 -3
  59. package/scripts/sentry-xcode.sh +8 -3
  60. package/src/js/NativeRNSentry.ts +2 -0
  61. package/ts3.8/dist/js/NativeRNSentry.d.ts +2 -0
  62. package/ts3.8/dist/js/index.d.ts +2 -2
  63. package/ts3.8/dist/js/options.d.ts +18 -10
  64. package/ts3.8/dist/js/touchevents.d.ts +8 -0
  65. package/ts3.8/dist/js/tracing/expoRouter.d.ts +25 -0
  66. package/ts3.8/dist/js/tracing/index.d.ts +2 -0
  67. package/ts3.8/dist/js/tracing/origin.d.ts +1 -0
  68. package/ts3.8/dist/js/tracing/reactnavigation.d.ts +9 -1
  69. package/ts3.8/dist/js/version.d.ts +1 -1
  70. package/ts3.8/dist/js/wrapper.d.ts +6 -2
Binary file
@@ -494,47 +494,44 @@ public class RNSentryModuleImpl {
494
494
  }
495
495
 
496
496
  @Nullable final ReadableMap experiments = rnOptions.getMap("_experiments");
497
- if (experiments == null || !experiments.hasKey("androidProfilingOptions")) {
497
+ if (experiments == null || !experiments.hasKey("profilingOptions")) {
498
498
  return;
499
499
  }
500
500
 
501
- @Nullable
502
- final ReadableMap androidProfilingOptions = experiments.getMap("androidProfilingOptions");
503
- if (androidProfilingOptions == null) {
501
+ @Nullable final ReadableMap profilingOptions = experiments.getMap("profilingOptions");
502
+ if (profilingOptions == null) {
504
503
  return;
505
504
  }
506
505
 
507
506
  // Set profile session sample rate
508
- if (androidProfilingOptions.hasKey("profileSessionSampleRate")) {
507
+ if (profilingOptions.hasKey("profileSessionSampleRate")) {
509
508
  final double profileSessionSampleRate =
510
- androidProfilingOptions.getDouble("profileSessionSampleRate");
509
+ profilingOptions.getDouble("profileSessionSampleRate");
511
510
  options.setProfileSessionSampleRate(profileSessionSampleRate);
512
511
  logger.log(
513
512
  SentryLevel.INFO,
514
513
  String.format(
515
- "Android UI Profiling profileSessionSampleRate set to: %.2f",
516
- profileSessionSampleRate));
514
+ "UI Profiling profileSessionSampleRate set to: %.2f", profileSessionSampleRate));
517
515
  }
518
516
 
519
517
  // Set profiling lifecycle mode
520
- if (androidProfilingOptions.hasKey("lifecycle")) {
521
- final String lifecycle = androidProfilingOptions.getString("lifecycle");
518
+ if (profilingOptions.hasKey("lifecycle")) {
519
+ final String lifecycle = profilingOptions.getString("lifecycle");
522
520
  if ("manual".equalsIgnoreCase(lifecycle)) {
523
521
  options.setProfileLifecycle(ProfileLifecycle.MANUAL);
524
- logger.log(SentryLevel.INFO, "Android UI Profile Lifecycle set to MANUAL");
522
+ logger.log(SentryLevel.INFO, "UI Profile Lifecycle set to MANUAL");
525
523
  } else if ("trace".equalsIgnoreCase(lifecycle)) {
526
524
  options.setProfileLifecycle(ProfileLifecycle.TRACE);
527
- logger.log(SentryLevel.INFO, "Android UI Profile Lifecycle set to TRACE");
525
+ logger.log(SentryLevel.INFO, "UI Profile Lifecycle set to TRACE");
528
526
  }
529
527
  }
530
528
 
531
529
  // Set start on app start
532
- if (androidProfilingOptions.hasKey("startOnAppStart")) {
533
- final boolean startOnAppStart = androidProfilingOptions.getBoolean("startOnAppStart");
530
+ if (profilingOptions.hasKey("startOnAppStart")) {
531
+ final boolean startOnAppStart = profilingOptions.getBoolean("startOnAppStart");
534
532
  options.setStartProfilerOnAppStart(startOnAppStart);
535
533
  logger.log(
536
- SentryLevel.INFO,
537
- String.format("Android UI Profiling startOnAppStart set to %b", startOnAppStart));
534
+ SentryLevel.INFO, String.format("Profiling startOnAppStart set to %b", startOnAppStart));
538
535
  }
539
536
  }
540
537
 
@@ -933,6 +930,26 @@ public class RNSentryModuleImpl {
933
930
  });
934
931
  }
935
932
 
933
+ public void setAttribute(String key, String value) {
934
+ // TODO(alwx): This is not implemented in sentry-android yet
935
+ /*
936
+ * Sentry.configureScope(
937
+ * scope -> {
938
+ * scope.setAttribute(key, value);
939
+ * });
940
+ */
941
+ }
942
+
943
+ public void setAttributes(ReadableMap attributes) {
944
+ // TODO(alwx): This is not implemented in sentry-android yet
945
+ /*
946
+ * Sentry.configureScope(
947
+ * scope -> {
948
+ * scope.setAttributes(attributes);
949
+ * });
950
+ */
951
+ }
952
+
936
953
  public void closeNativeSdk(Promise promise) {
937
954
  Sentry.close();
938
955
 
@@ -2,7 +2,7 @@ package io.sentry.react;
2
2
 
3
3
  class RNSentryVersion {
4
4
  static final String REACT_NATIVE_SDK_PACKAGE_NAME = "npm:@sentry/react-native";
5
- static final String REACT_NATIVE_SDK_PACKAGE_VERSION = "7.10.0";
5
+ static final String REACT_NATIVE_SDK_PACKAGE_VERSION = "7.12.0";
6
6
  static final String NATIVE_SDK_NAME = "sentry.native.android.react-native";
7
7
  static final String ANDROID_SDK_NAME = "sentry.java.android.react-native";
8
8
  static final String REACT_NATIVE_SDK_NAME = "sentry.javascript.react-native";
@@ -112,6 +112,16 @@ public class RNSentryModule extends NativeRNSentrySpec {
112
112
  this.impl.setTag(key, value);
113
113
  }
114
114
 
115
+ @Override
116
+ public void setAttribute(String key, String value) {
117
+ this.impl.setAttribute(key, value);
118
+ }
119
+
120
+ @Override
121
+ public void setAttributes(ReadableMap attributes) {
122
+ this.impl.setAttributes(attributes);
123
+ }
124
+
115
125
  @Override
116
126
  public void closeNativeSdk(Promise promise) {
117
127
  this.impl.closeNativeSdk(promise);
@@ -112,6 +112,16 @@ public class RNSentryModule extends ReactContextBaseJavaModule {
112
112
  this.impl.setTag(key, value);
113
113
  }
114
114
 
115
+ @ReactMethod
116
+ public void setAttribute(String key, String value) {
117
+ this.impl.setAttribute(key, value);
118
+ }
119
+
120
+ @ReactMethod
121
+ public void setAttributes(ReadableMap attributes) {
122
+ this.impl.setAttributes(attributes);
123
+ }
124
+
115
125
  @ReactMethod
116
126
  public void closeNativeSdk(Promise promise) {
117
127
  this.impl.closeNativeSdk(promise);
@@ -132,6 +142,11 @@ public class RNSentryModule extends ReactContextBaseJavaModule {
132
142
  this.impl.fetchNativeDeviceContexts(promise);
133
143
  }
134
144
 
145
+ @ReactMethod
146
+ public void fetchNativeLogAttributes(Promise promise) {
147
+ this.impl.fetchNativeLogAttributes(promise);
148
+ }
149
+
135
150
  @ReactMethod
136
151
  public void fetchNativeSdkInfo(Promise promise) {
137
152
  this.impl.fetchNativeSdkInfo(promise);
@@ -25,6 +25,8 @@ export interface Spec extends TurboModule {
25
25
  setContext(key: string, value: UnsafeObject | null): void;
26
26
  setExtra(key: string, value: string): void;
27
27
  setTag(key: string, value: string): void;
28
+ setAttribute(key: string, value: string): void;
29
+ setAttributes(attributes: UnsafeObject): void;
28
30
  enableNativeFramesTracking(): void;
29
31
  fetchModules(): Promise<string | undefined | null>;
30
32
  fetchViewHierarchy(): Promise<number[] | undefined | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"NativeRNSentry.d.ts","sourceRoot":"","sources":["../../src/js/NativeRNSentry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,c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"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AA6JnD,2DAA2D;AAC3D,eAAe,mBAAmB,CAAC,YAAY,CAAO,UAAU,CAAC,CAAC","sourcesContent":["import type { Package } from '@sentry/core';\nimport type { TurboModule } from 'react-native';\nimport { TurboModuleRegistry } from 'react-native';\nimport type { UnsafeObject } from './utils/rnlibrariesinterface';\n\n// There has to be only one interface and it has to be named `Spec`\n// Only extra allowed definitions are types (probably codegen bug)\nexport interface Spec extends TurboModule {\n addListener: (eventType: string) => void;\n removeListeners: (id: number) => void;\n getNewScreenTimeToDisplay(): Promise<number | undefined | null>;\n addBreadcrumb(breadcrumb: UnsafeObject): void;\n captureEnvelope(\n bytes: string,\n options: {\n hardCrashed: boolean;\n },\n ): Promise<boolean>;\n captureScreenshot(): Promise<NativeScreenshot[] | undefined | null>;\n clearBreadcrumbs(): void;\n crash(): void;\n closeNativeSdk(): Promise<void>;\n disableNativeFramesTracking(): void;\n fetchNativeRelease(): Promise<NativeReleaseResponse>;\n fetchNativeSdkInfo(): Promise<Package | null>;\n fetchNativeDeviceContexts(): Promise<NativeDeviceContextsResponse | null>;\n fetchNativeLogAttributes(): Promise<NativeDeviceContextsResponse | null>;\n fetchNativeAppStart(): Promise<NativeAppStartResponse | null>;\n fetchNativeFrames(): Promise<NativeFramesResponse | null>;\n initNativeSdk(options: UnsafeObject): Promise<boolean>;\n setUser(defaultUserKeys: UnsafeObject | null, otherUserKeys: UnsafeObject | null): void;\n setContext(key: string, value: UnsafeObject | null): void;\n setExtra(key: string, value: string): void;\n setTag(key: string, value: string): void;\n enableNativeFramesTracking(): void;\n fetchModules(): Promise<string | undefined | null>;\n fetchViewHierarchy(): Promise<number[] | undefined | null>;\n startProfiling(platformProfilers: boolean): { started?: boolean; error?: string };\n stopProfiling(): {\n profile?: string;\n nativeProfile?: UnsafeObject;\n androidProfile?: UnsafeObject;\n error?: string;\n };\n fetchNativePackageName(): string | undefined | null;\n fetchNativeStackFramesBy(instructionsAddr: number[]): NativeStackFrames | undefined | null;\n initNativeReactNavigationNewFrameTracking(): Promise<void>;\n captureReplay(isHardCrash: boolean): Promise<string | undefined | null>;\n getCurrentReplayId(): string | undefined | null;\n crashedLastRun(): Promise<boolean | undefined | null>;\n getDataFromUri(uri: string): Promise<number[]>;\n popTimeToDisplayFor(key: string): Promise<number | undefined | null>;\n setActiveSpanId(spanId: string): boolean;\n encodeToBase64(data: number[]): Promise<string | undefined | null>;\n}\n\nexport type NativeStackFrame = {\n platform: string;\n /**\n * The instruction address of this frame.\n * Formatted as hex with 0x prefix.\n */\n instruction_addr: string;\n package?: string;\n /**\n * The debug image address of this frame.\n * Formatted as hex with 0x prefix.\n */\n image_addr?: string;\n in_app?: boolean;\n /**\n * The symbol name of this frame.\n * If symbolicated locally.\n */\n function?: string;\n /**\n * The symbol address of this frame.\n * If symbolicated locally.\n * Formatted as hex with 0x prefix.\n */\n symbol_addr?: string;\n};\n\nexport type NativeDebugImage = {\n name?: string;\n type?: string;\n uuid?: string;\n debug_id?: string;\n image_addr?: string;\n image_size?: number;\n code_file?: string;\n image_vmaddr?: string;\n};\n\nexport type NativeStackFrames = {\n frames: NativeStackFrame[];\n debugMetaImages?: NativeDebugImage[];\n};\n\nexport type NativeAppStartResponse = {\n type: 'cold' | 'warm' | 'unknown';\n has_fetched: boolean;\n app_start_timestamp_ms?: number;\n spans: {\n description: string;\n start_timestamp_ms: number;\n end_timestamp_ms: number;\n }[];\n};\n\nexport type NativeFramesResponse = {\n totalFrames: number;\n slowFrames: number;\n frozenFrames: number;\n};\n\nexport type NativeReleaseResponse = {\n build: string;\n id: string;\n version: string;\n};\n\n/**\n * This type describes serialized scope from sentry-cocoa and sentry-android\n * https://github.com/getsentry/sentry-cocoa/blob/master/Sources/Sentry/SentryScope.m\n * https://github.com/getsentry/sentry-java/blob/a461f7e125b65240004e6162b341f383ce2e1394/sentry-android-core/src/main/java/io/sentry/android/core/InternalSentrySdk.java#L32\n */\nexport type NativeDeviceContextsResponse = {\n [key: string]: unknown;\n tags?: Record<string, string>;\n extra?: Record<string, unknown>;\n contexts?: Record<string, Record<string, unknown>>;\n user?: {\n userId?: string;\n email?: string;\n username?: string;\n ipAddress?: string;\n data?: Record<string, unknown>;\n };\n dist?: string;\n environment?: string;\n fingerprint?: string[];\n level?: string;\n breadcrumbs?: {\n level?: string;\n timestamp?: string;\n category?: string;\n type?: string;\n message?: string;\n data?: Record<string, unknown>;\n }[];\n};\n\nexport type NativeScreenshot = {\n data: number[];\n contentType: string;\n filename: string;\n};\n\n// The export must be here to pass codegen even if not used\nexport default TurboModuleRegistry.getEnforcing<Spec>('RNSentry');\n"]}
1
+ {"version":3,"file":"NativeRNSentry.js","sourceRoot":"","sources":["../../src/js/NativeRNSentry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AA+JnD,2DAA2D;AAC3D,eAAe,mBAAmB,CAAC,YAAY,CAAO,UAAU,CAAC,CAAC","sourcesContent":["import type { Package } from '@sentry/core';\nimport type { TurboModule } from 'react-native';\nimport { TurboModuleRegistry } from 'react-native';\nimport type { UnsafeObject } from './utils/rnlibrariesinterface';\n\n// There has to be only one interface and it has to be named `Spec`\n// Only extra allowed definitions are types (probably codegen bug)\nexport interface Spec extends TurboModule {\n addListener: (eventType: string) => void;\n removeListeners: (id: number) => void;\n getNewScreenTimeToDisplay(): Promise<number | undefined | null>;\n addBreadcrumb(breadcrumb: UnsafeObject): void;\n captureEnvelope(\n bytes: string,\n options: {\n hardCrashed: boolean;\n },\n ): Promise<boolean>;\n captureScreenshot(): Promise<NativeScreenshot[] | undefined | null>;\n clearBreadcrumbs(): void;\n crash(): void;\n closeNativeSdk(): Promise<void>;\n disableNativeFramesTracking(): void;\n fetchNativeRelease(): Promise<NativeReleaseResponse>;\n fetchNativeSdkInfo(): Promise<Package | null>;\n fetchNativeDeviceContexts(): Promise<NativeDeviceContextsResponse | null>;\n fetchNativeLogAttributes(): Promise<NativeDeviceContextsResponse | null>;\n fetchNativeAppStart(): Promise<NativeAppStartResponse | null>;\n fetchNativeFrames(): Promise<NativeFramesResponse | null>;\n initNativeSdk(options: UnsafeObject): Promise<boolean>;\n setUser(defaultUserKeys: UnsafeObject | null, otherUserKeys: UnsafeObject | null): void;\n setContext(key: string, value: UnsafeObject | null): void;\n setExtra(key: string, value: string): void;\n setTag(key: string, value: string): void;\n setAttribute(key: string, value: string): void;\n setAttributes(attributes: UnsafeObject): void;\n enableNativeFramesTracking(): void;\n fetchModules(): Promise<string | undefined | null>;\n fetchViewHierarchy(): Promise<number[] | undefined | null>;\n startProfiling(platformProfilers: boolean): { started?: boolean; error?: string };\n stopProfiling(): {\n profile?: string;\n nativeProfile?: UnsafeObject;\n androidProfile?: UnsafeObject;\n error?: string;\n };\n fetchNativePackageName(): string | undefined | null;\n fetchNativeStackFramesBy(instructionsAddr: number[]): NativeStackFrames | undefined | null;\n initNativeReactNavigationNewFrameTracking(): Promise<void>;\n captureReplay(isHardCrash: boolean): Promise<string | undefined | null>;\n getCurrentReplayId(): string | undefined | null;\n crashedLastRun(): Promise<boolean | undefined | null>;\n getDataFromUri(uri: string): Promise<number[]>;\n popTimeToDisplayFor(key: string): Promise<number | undefined | null>;\n setActiveSpanId(spanId: string): boolean;\n encodeToBase64(data: number[]): Promise<string | undefined | null>;\n}\n\nexport type NativeStackFrame = {\n platform: string;\n /**\n * The instruction address of this frame.\n * Formatted as hex with 0x prefix.\n */\n instruction_addr: string;\n package?: string;\n /**\n * The debug image address of this frame.\n * Formatted as hex with 0x prefix.\n */\n image_addr?: string;\n in_app?: boolean;\n /**\n * The symbol name of this frame.\n * If symbolicated locally.\n */\n function?: string;\n /**\n * The symbol address of this frame.\n * If symbolicated locally.\n * Formatted as hex with 0x prefix.\n */\n symbol_addr?: string;\n};\n\nexport type NativeDebugImage = {\n name?: string;\n type?: string;\n uuid?: string;\n debug_id?: string;\n image_addr?: string;\n image_size?: number;\n code_file?: string;\n image_vmaddr?: string;\n};\n\nexport type NativeStackFrames = {\n frames: NativeStackFrame[];\n debugMetaImages?: NativeDebugImage[];\n};\n\nexport type NativeAppStartResponse = {\n type: 'cold' | 'warm' | 'unknown';\n has_fetched: boolean;\n app_start_timestamp_ms?: number;\n spans: {\n description: string;\n start_timestamp_ms: number;\n end_timestamp_ms: number;\n }[];\n};\n\nexport type NativeFramesResponse = {\n totalFrames: number;\n slowFrames: number;\n frozenFrames: number;\n};\n\nexport type NativeReleaseResponse = {\n build: string;\n id: string;\n version: string;\n};\n\n/**\n * This type describes serialized scope from sentry-cocoa and sentry-android\n * https://github.com/getsentry/sentry-cocoa/blob/master/Sources/Sentry/SentryScope.m\n * https://github.com/getsentry/sentry-java/blob/a461f7e125b65240004e6162b341f383ce2e1394/sentry-android-core/src/main/java/io/sentry/android/core/InternalSentrySdk.java#L32\n */\nexport type NativeDeviceContextsResponse = {\n [key: string]: unknown;\n tags?: Record<string, string>;\n extra?: Record<string, unknown>;\n contexts?: Record<string, Record<string, unknown>>;\n user?: {\n userId?: string;\n email?: string;\n username?: string;\n ipAddress?: string;\n data?: Record<string, unknown>;\n };\n dist?: string;\n environment?: string;\n fingerprint?: string[];\n level?: string;\n breadcrumbs?: {\n level?: string;\n timestamp?: string;\n category?: string;\n type?: string;\n message?: string;\n data?: Record<string, unknown>;\n }[];\n};\n\nexport type NativeScreenshot = {\n data: number[];\n contentType: string;\n filename: string;\n};\n\n// The export must be here to pass codegen even if not used\nexport default TurboModuleRegistry.getEnforcing<Spec>('RNSentry');\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/js/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,QAAQ,EACR,KAAK,EACL,SAAS,EAET,aAAa,EACb,4BAA4B,EAC5B,YAAY,EACb,MAAM,cAAc,CAAC;AACtB,OAAO,EAGL,MAAM,EAIP,MAAM,cAAc,CAAC;AAKtB,OAAO,KAAK,EAAE,wBAAwB,EAA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ACtB,OAAO,EAGL,MAAM,EAIP,MAAM,cAAc,CAAC;AAKtB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAW1D;;;;;GAKG;AACH,qBAAa,iBAAkB,SAAQ,MAAM,CAAC,wBAAwB,CAAC;IACrE,OAAO,CAAC,eAAe,CAAY;IACnC,OAAO,CAAC,oBAAoB,CAA4C;IAExE;;;OAGG;gBACgB,OAAO,EAAE,wBAAwB;IAsDpD;;OAEG;IACI,kBAAkB,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,GAAE,SAAc,GAAG,WAAW,CAAC,KAAK,CAAC;IAIvF;;OAEG;IACI,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;IAIrG;;;OAGG;IACI,WAAW,IAAI,IAAI;IAI1B;;OAEG;IACI,KAAK,IAAI,WAAW,CAAC,OAAO,CAAC;IAOpC;;;OAGG;IACI,mBAAmB,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI;IAUxD;;OAEG;IACI,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,WAAW,CAAC,4BAA4B,CAAC;IAiClF;;OAEG;IACI,IAAI,IAAI,IAAI;IAKnB;;;;OAIG;IACI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,IAAI;IAKtD;;;;OAIG;IACI,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAKnD;;OAEG;IACH,OAAO,CAAC,cAAc;IA+BtB;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAShC;;OAEG;IACH,OAAO,CAAC,qBAAqB;CAa9B"}
package/dist/js/client.js CHANGED
@@ -161,11 +161,11 @@ export class ReactNativeClient extends Client {
161
161
  * Starts native client with dsn and options
162
162
  */
163
163
  _initNativeSdk() {
164
- var _a, _b;
164
+ var _a, _b, _c, _d;
165
165
  NATIVE.initNativeSdk(Object.assign(Object.assign({}, this._options), { defaultSidecarUrl: getDefaultSidecarUrl(), devServerUrl: ((_a = getDevServer()) === null || _a === void 0 ? void 0 : _a.url) || '', mobileReplayOptions: this._integrations[MOBILE_REPLAY_INTEGRATION_NAME] &&
166
166
  'options' in this._integrations[MOBILE_REPLAY_INTEGRATION_NAME]
167
167
  ? this._integrations[MOBILE_REPLAY_INTEGRATION_NAME].options
168
- : undefined, androidProfilingOptions: (_b = this._options._experiments) === null || _b === void 0 ? void 0 : _b.androidProfilingOptions }))
168
+ : undefined, profilingOptions: (_c = (_b = this._options._experiments) === null || _b === void 0 ? void 0 : _b.profilingOptions) !== null && _c !== void 0 ? _c : (_d = this._options._experiments) === null || _d === void 0 ? void 0 : _d.androidProfilingOptions }))
169
169
  .then((result) => {
170
170
  return result;
171
171
  }, () => {
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/js/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAYvE,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,MAAM,EACN,sBAAsB,EACtB,KAAK,EACL,WAAW,GACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,aA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AAE;YACH,IAAI,CAAC,wBAAwB,EAAE,CAAC;YAChC,OAAO,KAAK,CAAC;QACf,CAAC,CACF;aACA,IAAI,CAAC,CAAC,iBAA0B,EAAE,EAAE;;YACnC,MAAA,MAAA,IAAI,CAAC,QAAQ,EAAC,OAAO,mDAAG,EAAE,iBAAiB,EAAE,CAAC,CAAC;YAC/C,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzB,CAAC,CAAC;aACD,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE;YACvB,KAAK,CAAC,KAAK,CAAC,uCAAuC,EAAE,KAAK,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACK,wBAAwB;QAC9B,IAAI,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,EAAE;YAC/C,KAAK,CAAC,KAAK,CACT,QAAQ,EACR,6NAA6N,CAC9N,CAAC;SACH;IACH,CAAC;IAED;;OAEG;IACK,qBAAqB,CAAC,QAAmB,EAAE,QAA8B;QAC/E,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YACvB,MAAM,gBAAgB,GAAqB;gBACzC,EAAE,IAAI,EAAE,eAAe,EAAE;gBACzB;oBACE,SAAS,EAAE,sBAAsB,EAAE;oBACnC,gBAAgB,EAAE,QAAQ;iBAC3B;aACF,CAAC;YAEF,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;SACxC;IACH,CAAC;CACF","sourcesContent":["import { eventFromException, eventFromMessage } from '@sentry/browser';\nimport type {\n ClientReportEnvelope,\n ClientReportItem,\n Envelope,\n Event,\n EventHint,\n Outcome,\n SeverityLevel,\n TransportMakeRequestResponse,\n UserFeedback,\n} from '@sentry/core';\nimport {\n _INTERNAL_flushLogsBuffer,\n addAutoIpAddressToSession,\n Client,\n dateTimestampInSeconds,\n debug,\n SentryError,\n} from '@sentry/core';\nimport { Alert } from 'react-native';\nimport { getDevServer } from './integrations/debugsymbolicatorutils';\nimport { defaultSdkInfo } from './integrations/sdkinfo';\nimport { getDefaultSidecarUrl } from './integrations/spotlight';\nimport type { ReactNativeClientOptions } from './options';\nimport type { mobileReplayIntegration } from './replay/mobilereplay';\nimport { MOBILE_REPLAY_INTEGRATION_NAME } from './replay/mobilereplay';\nimport { createUserFeedbackEnvelope, items } from './utils/envelope';\nimport { ignoreRequireCycleLogs } from './utils/ignorerequirecyclelogs';\nimport { mergeOutcomes } from './utils/outcome';\nimport { ReactNativeLibraries } from './utils/rnlibraries';\nimport { NATIVE } from './wrapper';\n\nconst DEFAULT_FLUSH_INTERVAL = 5000;\n\n/**\n * The Sentry React Native SDK Client.\n *\n * @see ReactNativeClientOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class ReactNativeClient extends Client<ReactNativeClientOptions> {\n private _outcomesBuffer: Outcome[];\n private _logFlushIdleTimeout: ReturnType<typeof setTimeout> | undefined;\n\n /**\n * Creates a new React Native SDK instance.\n * @param options Configuration options for this SDK.\n */\n public constructor(options: ReactNativeClientOptions) {\n ignoreRequireCycleLogs(ReactNativeLibraries.ReactNativeVersion?.version);\n options._metadata = {\n ...options._metadata,\n sdk: {\n ...(options._metadata?.sdk || defaultSdkInfo),\n settings: {\n // Only allow IP inferral by Relay if sendDefaultPii is true\n infer_ip: options.sendDefaultPii ? 'auto' : 'never',\n ...options._metadata?.sdk?.settings,\n },\n },\n };\n\n // We default this to true, as it is the safer scenario\n options.parentSpanIsAlwaysRootSpan =\n options.parentSpanIsAlwaysRootSpan === undefined ? true : options.parentSpanIsAlwaysRootSpan;\n\n // enableLogs must be disabled before calling super() to avoid logs being captured.\n // This makes a copy of the user defined value, so we can restore it later for the native usaege.\n const originalEnableLogs = options.enableLogs;\n if (options.enableLogs && options.logsOrigin === 'native') {\n debug.log('disabling Sentry logs on JavaScript due to rule set by logsOrigin');\n options.enableLogs = false;\n }\n\n super(options);\n\n this._outcomesBuffer = [];\n\n if (options.sendDefaultPii === true) {\n this.on('beforeSendSession', addAutoIpAddressToSession);\n }\n\n if (options.enableLogs) {\n this.on('flush', () => {\n _INTERNAL_flushLogsBuffer(this);\n });\n\n this.on('afterCaptureLog', () => {\n if (this._logFlushIdleTimeout) {\n clearTimeout(this._logFlushIdleTimeout);\n }\n\n this._logFlushIdleTimeout = setTimeout(() => {\n _INTERNAL_flushLogsBuffer(this);\n }, DEFAULT_FLUSH_INTERVAL);\n });\n }\n\n // Restore original settings for enabling Native options.\n options.enableLogs = originalEnableLogs;\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: unknown, hint: EventHint = {}): PromiseLike<Event> {\n return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(message: string, level?: SeverityLevel, hint?: EventHint): PromiseLike<Event> {\n return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n }\n\n /**\n * If native client is available it will trigger a native crash.\n * Use this only for testing purposes.\n */\n public nativeCrash(): void {\n NATIVE.nativeCrash();\n }\n\n /**\n * @inheritDoc\n */\n public close(): PromiseLike<boolean> {\n // As super.close() flushes queued events, we wait for that to finish before closing the native SDK.\n return super.close().then((result: boolean) => {\n return NATIVE.closeNativeSdk().then(() => result);\n });\n }\n\n /**\n * Sends user feedback to Sentry.\n * @deprecated Use `Sentry.captureFeedback` instead.\n */\n public captureUserFeedback(feedback: UserFeedback): void {\n const envelope = createUserFeedbackEnvelope(feedback, {\n metadata: this._options._metadata,\n dsn: this.getDsn(),\n tunnel: undefined,\n });\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.sendEnvelope(envelope);\n }\n\n /**\n * @inheritdoc\n */\n public sendEnvelope(envelope: Envelope): PromiseLike<TransportMakeRequestResponse> {\n const outcomes = this._clearOutcomes();\n this._outcomesBuffer = mergeOutcomes(this._outcomesBuffer, outcomes);\n\n if (this._options.sendClientReports) {\n this._attachClientReportTo(this._outcomesBuffer, envelope as ClientReportEnvelope);\n }\n\n let shouldClearOutcomesBuffer = true;\n if (this._isEnabled() && this._transport && this._dsn) {\n this.emit('beforeEnvelope', envelope);\n\n this._transport.send(envelope).then(null, reason => {\n if (reason instanceof SentryError) {\n // SentryError is thrown by SyncPromise\n shouldClearOutcomesBuffer = false;\n // If this is called asynchronously we want the _outcomesBuffer to be cleared\n debug.error('SentryError while sending event, keeping outcomes buffer:', reason);\n } else {\n debug.error('Error while sending event:', reason);\n }\n });\n } else {\n debug.error('Transport disabled');\n }\n\n if (shouldClearOutcomesBuffer) {\n this._outcomesBuffer = []; // if send fails synchronously the _outcomesBuffer will stay intact\n }\n\n return Promise.resolve({});\n }\n\n /**\n * @inheritDoc\n */\n public init(): void {\n super.init();\n this._initNativeSdk();\n }\n\n /**\n * Register a hook on this client.\n *\n * (Generic method signature to allow for custom React Native Client events.)\n */\n public on(hook: string, callback: unknown): () => void {\n // @ts-expect-error on from the base class doesn't support generic types\n return super.on(hook, callback);\n }\n\n /**\n * Emit a hook that was previously registered via `on()`.\n *\n * (Generic method signature to allow for custom React Native Client events.)\n */\n public emit(hook: string, ...rest: unknown[]): void {\n // @ts-expect-error emit from the base class doesn't support generic types\n super.emit(hook, ...rest);\n }\n\n /**\n * Starts native client with dsn and options\n */\n private _initNativeSdk(): void {\n NATIVE.initNativeSdk({\n ...this._options,\n defaultSidecarUrl: getDefaultSidecarUrl(),\n devServerUrl: getDevServer()?.url || '',\n mobileReplayOptions:\n this._integrations[MOBILE_REPLAY_INTEGRATION_NAME] &&\n 'options' in this._integrations[MOBILE_REPLAY_INTEGRATION_NAME]\n ? (this._integrations[MOBILE_REPLAY_INTEGRATION_NAME] as ReturnType<typeof mobileReplayIntegration>).options\n : undefined,\n androidProfilingOptions: this._options._experiments?.androidProfilingOptions,\n })\n .then(\n (result: boolean) => {\n return result;\n },\n () => {\n this._showCannotConnectDialog();\n return false;\n },\n )\n .then((didCallNativeInit: boolean) => {\n this._options.onReady?.({ didCallNativeInit });\n this.emit('afterInit');\n })\n .then(undefined, error => {\n debug.error('The OnReady callback threw an error: ', error);\n });\n }\n\n /**\n * If the user is in development mode, and the native nagger is enabled then it will show an alert.\n */\n private _showCannotConnectDialog(): void {\n if (__DEV__ && this._options.enableNativeNagger) {\n Alert.alert(\n 'Sentry',\n 'Warning, could not connect to Sentry native SDK.\\nIf you do not want to use the native component please pass `enableNative: false` in the options.\\nVisit: https://docs.sentry.io/platforms/react-native/ for more details.',\n );\n }\n }\n\n /**\n * Attaches a client report from outcomes to the envelope.\n */\n private _attachClientReportTo(outcomes: Outcome[], envelope: ClientReportEnvelope): void {\n if (outcomes.length > 0) {\n const clientReportItem: ClientReportItem = [\n { type: 'client_report' },\n {\n timestamp: dateTimestampInSeconds(),\n discarded_events: outcomes,\n },\n ];\n\n envelope[items].push(clientReportItem);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/js/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAYvE,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,MAAM,EACN,sBAAsB,EACtB,KAAK,EACL,WAAW,GACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MA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AE;YACH,IAAI,CAAC,wBAAwB,EAAE,CAAC;YAChC,OAAO,KAAK,CAAC;QACf,CAAC,CACF;aACA,IAAI,CAAC,CAAC,iBAA0B,EAAE,EAAE;;YACnC,MAAA,MAAA,IAAI,CAAC,QAAQ,EAAC,OAAO,mDAAG,EAAE,iBAAiB,EAAE,CAAC,CAAC;YAC/C,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzB,CAAC,CAAC;aACD,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE;YACvB,KAAK,CAAC,KAAK,CAAC,uCAAuC,EAAE,KAAK,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACK,wBAAwB;QAC9B,IAAI,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,EAAE;YAC/C,KAAK,CAAC,KAAK,CACT,QAAQ,EACR,6NAA6N,CAC9N,CAAC;SACH;IACH,CAAC;IAED;;OAEG;IACK,qBAAqB,CAAC,QAAmB,EAAE,QAA8B;QAC/E,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YACvB,MAAM,gBAAgB,GAAqB;gBACzC,EAAE,IAAI,EAAE,eAAe,EAAE;gBACzB;oBACE,SAAS,EAAE,sBAAsB,EAAE;oBACnC,gBAAgB,EAAE,QAAQ;iBAC3B;aACF,CAAC;YAEF,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;SACxC;IACH,CAAC;CACF","sourcesContent":["import { eventFromException, eventFromMessage } from '@sentry/browser';\nimport type {\n ClientReportEnvelope,\n ClientReportItem,\n Envelope,\n Event,\n EventHint,\n Outcome,\n SeverityLevel,\n TransportMakeRequestResponse,\n UserFeedback,\n} from '@sentry/core';\nimport {\n _INTERNAL_flushLogsBuffer,\n addAutoIpAddressToSession,\n Client,\n dateTimestampInSeconds,\n debug,\n SentryError,\n} from '@sentry/core';\nimport { Alert } from 'react-native';\nimport { getDevServer } from './integrations/debugsymbolicatorutils';\nimport { defaultSdkInfo } from './integrations/sdkinfo';\nimport { getDefaultSidecarUrl } from './integrations/spotlight';\nimport type { ReactNativeClientOptions } from './options';\nimport type { mobileReplayIntegration } from './replay/mobilereplay';\nimport { MOBILE_REPLAY_INTEGRATION_NAME } from './replay/mobilereplay';\nimport { createUserFeedbackEnvelope, items } from './utils/envelope';\nimport { ignoreRequireCycleLogs } from './utils/ignorerequirecyclelogs';\nimport { mergeOutcomes } from './utils/outcome';\nimport { ReactNativeLibraries } from './utils/rnlibraries';\nimport { NATIVE } from './wrapper';\n\nconst DEFAULT_FLUSH_INTERVAL = 5000;\n\n/**\n * The Sentry React Native SDK Client.\n *\n * @see ReactNativeClientOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class ReactNativeClient extends Client<ReactNativeClientOptions> {\n private _outcomesBuffer: Outcome[];\n private _logFlushIdleTimeout: ReturnType<typeof setTimeout> | undefined;\n\n /**\n * Creates a new React Native SDK instance.\n * @param options Configuration options for this SDK.\n */\n public constructor(options: ReactNativeClientOptions) {\n ignoreRequireCycleLogs(ReactNativeLibraries.ReactNativeVersion?.version);\n options._metadata = {\n ...options._metadata,\n sdk: {\n ...(options._metadata?.sdk || defaultSdkInfo),\n settings: {\n // Only allow IP inferral by Relay if sendDefaultPii is true\n infer_ip: options.sendDefaultPii ? 'auto' : 'never',\n ...options._metadata?.sdk?.settings,\n },\n },\n };\n\n // We default this to true, as it is the safer scenario\n options.parentSpanIsAlwaysRootSpan =\n options.parentSpanIsAlwaysRootSpan === undefined ? true : options.parentSpanIsAlwaysRootSpan;\n\n // enableLogs must be disabled before calling super() to avoid logs being captured.\n // This makes a copy of the user defined value, so we can restore it later for the native usaege.\n const originalEnableLogs = options.enableLogs;\n if (options.enableLogs && options.logsOrigin === 'native') {\n debug.log('disabling Sentry logs on JavaScript due to rule set by logsOrigin');\n options.enableLogs = false;\n }\n\n super(options);\n\n this._outcomesBuffer = [];\n\n if (options.sendDefaultPii === true) {\n this.on('beforeSendSession', addAutoIpAddressToSession);\n }\n\n if (options.enableLogs) {\n this.on('flush', () => {\n _INTERNAL_flushLogsBuffer(this);\n });\n\n this.on('afterCaptureLog', () => {\n if (this._logFlushIdleTimeout) {\n clearTimeout(this._logFlushIdleTimeout);\n }\n\n this._logFlushIdleTimeout = setTimeout(() => {\n _INTERNAL_flushLogsBuffer(this);\n }, DEFAULT_FLUSH_INTERVAL);\n });\n }\n\n // Restore original settings for enabling Native options.\n options.enableLogs = originalEnableLogs;\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: unknown, hint: EventHint = {}): PromiseLike<Event> {\n return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(message: string, level?: SeverityLevel, hint?: EventHint): PromiseLike<Event> {\n return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n }\n\n /**\n * If native client is available it will trigger a native crash.\n * Use this only for testing purposes.\n */\n public nativeCrash(): void {\n NATIVE.nativeCrash();\n }\n\n /**\n * @inheritDoc\n */\n public close(): PromiseLike<boolean> {\n // As super.close() flushes queued events, we wait for that to finish before closing the native SDK.\n return super.close().then((result: boolean) => {\n return NATIVE.closeNativeSdk().then(() => result);\n });\n }\n\n /**\n * Sends user feedback to Sentry.\n * @deprecated Use `Sentry.captureFeedback` instead.\n */\n public captureUserFeedback(feedback: UserFeedback): void {\n const envelope = createUserFeedbackEnvelope(feedback, {\n metadata: this._options._metadata,\n dsn: this.getDsn(),\n tunnel: undefined,\n });\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.sendEnvelope(envelope);\n }\n\n /**\n * @inheritdoc\n */\n public sendEnvelope(envelope: Envelope): PromiseLike<TransportMakeRequestResponse> {\n const outcomes = this._clearOutcomes();\n this._outcomesBuffer = mergeOutcomes(this._outcomesBuffer, outcomes);\n\n if (this._options.sendClientReports) {\n this._attachClientReportTo(this._outcomesBuffer, envelope as ClientReportEnvelope);\n }\n\n let shouldClearOutcomesBuffer = true;\n if (this._isEnabled() && this._transport && this._dsn) {\n this.emit('beforeEnvelope', envelope);\n\n this._transport.send(envelope).then(null, reason => {\n if (reason instanceof SentryError) {\n // SentryError is thrown by SyncPromise\n shouldClearOutcomesBuffer = false;\n // If this is called asynchronously we want the _outcomesBuffer to be cleared\n debug.error('SentryError while sending event, keeping outcomes buffer:', reason);\n } else {\n debug.error('Error while sending event:', reason);\n }\n });\n } else {\n debug.error('Transport disabled');\n }\n\n if (shouldClearOutcomesBuffer) {\n this._outcomesBuffer = []; // if send fails synchronously the _outcomesBuffer will stay intact\n }\n\n return Promise.resolve({});\n }\n\n /**\n * @inheritDoc\n */\n public init(): void {\n super.init();\n this._initNativeSdk();\n }\n\n /**\n * Register a hook on this client.\n *\n * (Generic method signature to allow for custom React Native Client events.)\n */\n public on(hook: string, callback: unknown): () => void {\n // @ts-expect-error on from the base class doesn't support generic types\n return super.on(hook, callback);\n }\n\n /**\n * Emit a hook that was previously registered via `on()`.\n *\n * (Generic method signature to allow for custom React Native Client events.)\n */\n public emit(hook: string, ...rest: unknown[]): void {\n // @ts-expect-error emit from the base class doesn't support generic types\n super.emit(hook, ...rest);\n }\n\n /**\n * Starts native client with dsn and options\n */\n private _initNativeSdk(): void {\n NATIVE.initNativeSdk({\n ...this._options,\n defaultSidecarUrl: getDefaultSidecarUrl(),\n devServerUrl: getDevServer()?.url || '',\n mobileReplayOptions:\n this._integrations[MOBILE_REPLAY_INTEGRATION_NAME] &&\n 'options' in this._integrations[MOBILE_REPLAY_INTEGRATION_NAME]\n ? (this._integrations[MOBILE_REPLAY_INTEGRATION_NAME] as ReturnType<typeof mobileReplayIntegration>).options\n : undefined,\n profilingOptions:\n this._options._experiments?.profilingOptions ?? this._options._experiments?.androidProfilingOptions,\n })\n .then(\n (result: boolean) => {\n return result;\n },\n () => {\n this._showCannotConnectDialog();\n return false;\n },\n )\n .then((didCallNativeInit: boolean) => {\n this._options.onReady?.({ didCallNativeInit });\n this.emit('afterInit');\n })\n .then(undefined, error => {\n debug.error('The OnReady callback threw an error: ', error);\n });\n }\n\n /**\n * If the user is in development mode, and the native nagger is enabled then it will show an alert.\n */\n private _showCannotConnectDialog(): void {\n if (__DEV__ && this._options.enableNativeNagger) {\n Alert.alert(\n 'Sentry',\n 'Warning, could not connect to Sentry native SDK.\\nIf you do not want to use the native component please pass `enableNative: false` in the options.\\nVisit: https://docs.sentry.io/platforms/react-native/ for more details.',\n );\n }\n }\n\n /**\n * Attaches a client report from outcomes to the envelope.\n */\n private _attachClientReportTo(outcomes: Outcome[], envelope: ClientReportEnvelope): void {\n if (outcomes.length > 0) {\n const clientReportItem: ClientReportItem = [\n { type: 'client_report' },\n {\n timestamp: dateTimestampInSeconds(),\n discarded_events: outcomes,\n },\n ];\n\n envelope[items].push(clientReportItem);\n }\n }\n}\n"]}
@@ -8,8 +8,8 @@ export type { ReactNativeOptions } from './options';
8
8
  export { ReactNativeClient } from './client';
9
9
  export { init, wrap, nativeCrash, flush, close, withScope, crashedLastRun } from './sdk';
10
10
  export { TouchEventBoundary, withTouchEventBoundary } from './touchevents';
11
- export { reactNativeTracingIntegration, getCurrentReactNativeTracingIntegration, getReactNativeTracingIntegration, reactNavigationIntegration, reactNativeNavigationIntegration, sentryTraceGesture, TimeToInitialDisplay, TimeToFullDisplay, startTimeToInitialDisplaySpan, startTimeToFullDisplaySpan, startIdleNavigationSpan, startIdleSpan, getDefaultIdleNavigationSpanOptions, createTimeToFullDisplay, createTimeToInitialDisplay, } from './tracing';
12
- export type { TimeToDisplayProps } from './tracing';
11
+ export { reactNativeTracingIntegration, getCurrentReactNativeTracingIntegration, getReactNativeTracingIntegration, reactNavigationIntegration, reactNativeNavigationIntegration, sentryTraceGesture, TimeToInitialDisplay, TimeToFullDisplay, startTimeToInitialDisplaySpan, startTimeToFullDisplaySpan, startIdleNavigationSpan, startIdleSpan, getDefaultIdleNavigationSpanOptions, createTimeToFullDisplay, createTimeToInitialDisplay, wrapExpoRouter, } from './tracing';
12
+ export type { TimeToDisplayProps, ExpoRouter } from './tracing';
13
13
  export { Mask, Unmask } from './replay/CustomMask';
14
14
  export { FeedbackButton } from './feedback/FeedbackButton';
15
15
  export { FeedbackWidget } from './feedback/FeedbackWidget';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/js/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,OAAO,EACP,KAAK,EACL,SAAS,EACT,kBAAkB,EAClB,aAAa,EACb,IAAI,EACJ,UAAU,EACV,UAAU,EACV,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,MAAM,GACP,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,aAAa,EACb,WAAW,EACX,cAAc,EACd,eAAe,EACf,UAAU,EACV,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,MAAM,EACN,yBAAyB,EACzB,uBAAuB,EACvB,KAAK,uBAAuB,EAC5B,OAAO,GACR,MAAM,iBAAiB,CAAC;AAEzB,cAAc,wBAAwB,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAClD,YAAY,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,iBAAi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B,CAAC;AAEnD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE9G,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
package/dist/js/index.js CHANGED
@@ -6,7 +6,7 @@ export { SDK_NAME, SDK_VERSION } from './version';
6
6
  export { ReactNativeClient } from './client';
7
7
  export { init, wrap, nativeCrash, flush, close, withScope, crashedLastRun } from './sdk';
8
8
  export { TouchEventBoundary, withTouchEventBoundary } from './touchevents';
9
- export { reactNativeTracingIntegration, getCurrentReactNativeTracingIntegration, getReactNativeTracingIntegration, reactNavigationIntegration, reactNativeNavigationIntegration, sentryTraceGesture, TimeToInitialDisplay, TimeToFullDisplay, startTimeToInitialDisplaySpan, startTimeToFullDisplaySpan, startIdleNavigationSpan, startIdleSpan, getDefaultIdleNavigationSpanOptions, createTimeToFullDisplay, createTimeToInitialDisplay, } from './tracing';
9
+ export { reactNativeTracingIntegration, getCurrentReactNativeTracingIntegration, getReactNativeTracingIntegration, reactNavigationIntegration, reactNativeNavigationIntegration, sentryTraceGesture, TimeToInitialDisplay, TimeToFullDisplay, startTimeToInitialDisplaySpan, startTimeToFullDisplaySpan, startIdleNavigationSpan, startIdleSpan, getDefaultIdleNavigationSpanOptions, createTimeToFullDisplay, createTimeToInitialDisplay, wrapExpoRouter, } from './tracing';
10
10
  export { Mask, Unmask } from './replay/CustomMask';
11
11
  export { FeedbackButton } from './feedback/FeedbackButton';
12
12
  export { FeedbackWidget } from './feedback/FeedbackWidget';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/js/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,K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2B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE9G,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC","sourcesContent":["export type {\n Breadcrumb,\n SdkInfo,\n Event,\n Exception,\n SendFeedbackParams,\n SeverityLevel,\n Span,\n StackFrame,\n Stacktrace,\n Thread,\n User,\n UserFeedback,\n ErrorEvent,\n TransactionEvent,\n Metric,\n} from '@sentry/core';\n\nexport {\n addBreadcrumb,\n addIntegration,\n captureException,\n captureEvent,\n captureFeedback,\n captureMessage,\n Scope,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n startInactiveSpan,\n startSpan,\n startSpanManual,\n getActiveSpan,\n getRootSpan,\n withActiveSpan,\n suppressTracing,\n spanToJSON,\n spanIsSampled,\n setMeasurement,\n getCurrentScope,\n getGlobalScope,\n getIsolationScope,\n getClient,\n setCurrentClient,\n addEventProcessor,\n lastEventId,\n} from '@sentry/core';\n\nexport {\n ErrorBoundary,\n withErrorBoundary,\n createReduxEnhancer,\n Profiler,\n useProfiler,\n withProfiler,\n} from '@sentry/react';\n\nexport {\n logger,\n consoleLoggingIntegration,\n featureFlagsIntegration,\n type FeatureFlagsIntegration,\n metrics,\n} from '@sentry/browser';\n\nexport * from './integrations/exports';\n\nexport { SDK_NAME, SDK_VERSION } from './version';\nexport type { ReactNativeOptions } from './options';\nexport { ReactNativeClient } from './client';\n\nexport { init, wrap, nativeCrash, flush, close, withScope, crashedLastRun } from './sdk';\nexport { TouchEventBoundary, withTouchEventBoundary } from './touchevents';\n\nexport {\n reactNativeTracingIntegration,\n getCurrentReactNativeTracingIntegration,\n getReactNativeTracingIntegration,\n reactNavigationIntegration,\n reactNativeNavigationIntegration,\n sentryTraceGesture,\n TimeToInitialDisplay,\n TimeToFullDisplay,\n startTimeToInitialDisplaySpan,\n startTimeToFullDisplaySpan,\n startIdleNavigationSpan,\n startIdleSpan,\n getDefaultIdleNavigationSpanOptions,\n createTimeToFullDisplay,\n createTimeToInitialDisplay,\n} from './tracing';\n\nexport type { TimeToDisplayProps } from './tracing';\n\nexport { Mask, Unmask } from './replay/CustomMask';\n\nexport { FeedbackButton } from './feedback/FeedbackButton';\nexport { FeedbackWidget } from './feedback/FeedbackWidget';\nexport { showFeedbackWidget, showFeedbackButton, hideFeedbackButton } from './feedback/FeedbackWidgetManager';\n\nexport { getDataFromUri } from './wrapper';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/js/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,aAAa,EACb,WAAW,EACX,cAAc,EACd,eAAe,EACf,UAAU,EACV,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,MAAM,EACN,yBAAyB,EACzB,uBAAuB,EAEvB,OAAO,GACR,MAAM,iBAAiB,CAAC;AAEzB,cAAc,wBAAwB,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACzF,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,EACL,6BAA6B,EAC7B,uCAAuC,EACvC,gCAAgC,EAChC,0BAA0B,EAC1B,gCAAgC,EAChC,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,6BAA6B,EAC7B,0BAA0B,EAC1B,uBAAuB,EACvB,aAAa,EACb,mCAAmC,EACnC,uBAAuB,EACvB,0BAA0B,EAC1B,cAAc,GACf,MAAM,WAAW,CAAC;AAInB,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE9G,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC","sourcesContent":["export type {\n Breadcrumb,\n SdkInfo,\n Event,\n Exception,\n SendFeedbackParams,\n SeverityLevel,\n Span,\n StackFrame,\n Stacktrace,\n Thread,\n User,\n UserFeedback,\n ErrorEvent,\n TransactionEvent,\n Metric,\n} from '@sentry/core';\n\nexport {\n addBreadcrumb,\n addIntegration,\n captureException,\n captureEvent,\n captureFeedback,\n captureMessage,\n Scope,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n startInactiveSpan,\n startSpan,\n startSpanManual,\n getActiveSpan,\n getRootSpan,\n withActiveSpan,\n suppressTracing,\n spanToJSON,\n spanIsSampled,\n setMeasurement,\n getCurrentScope,\n getGlobalScope,\n getIsolationScope,\n getClient,\n setCurrentClient,\n addEventProcessor,\n lastEventId,\n} from '@sentry/core';\n\nexport {\n ErrorBoundary,\n withErrorBoundary,\n createReduxEnhancer,\n Profiler,\n useProfiler,\n withProfiler,\n} from '@sentry/react';\n\nexport {\n logger,\n consoleLoggingIntegration,\n featureFlagsIntegration,\n type FeatureFlagsIntegration,\n metrics,\n} from '@sentry/browser';\n\nexport * from './integrations/exports';\n\nexport { SDK_NAME, SDK_VERSION } from './version';\nexport type { ReactNativeOptions } from './options';\nexport { ReactNativeClient } from './client';\n\nexport { init, wrap, nativeCrash, flush, close, withScope, crashedLastRun } from './sdk';\nexport { TouchEventBoundary, withTouchEventBoundary } from './touchevents';\n\nexport {\n reactNativeTracingIntegration,\n getCurrentReactNativeTracingIntegration,\n getReactNativeTracingIntegration,\n reactNavigationIntegration,\n reactNativeNavigationIntegration,\n sentryTraceGesture,\n TimeToInitialDisplay,\n TimeToFullDisplay,\n startTimeToInitialDisplaySpan,\n startTimeToFullDisplaySpan,\n startIdleNavigationSpan,\n startIdleSpan,\n getDefaultIdleNavigationSpanOptions,\n createTimeToFullDisplay,\n createTimeToInitialDisplay,\n wrapExpoRouter,\n} from './tracing';\n\nexport type { TimeToDisplayProps, ExpoRouter } from './tracing';\n\nexport { Mask, Unmask } from './replay/CustomMask';\n\nexport { FeedbackButton } from './feedback/FeedbackButton';\nexport { FeedbackWidget } from './feedback/FeedbackWidget';\nexport { showFeedbackWidget, showFeedbackButton, hideFeedbackButton } from './feedback/FeedbackWidgetManager';\n\nexport { getDataFromUri } from './wrapper';\n"]}
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { debug } from '@sentry/core';
10
+ import { debug, getCurrentScope, getGlobalScope, getIsolationScope } from '@sentry/core';
11
11
  import { NATIVE } from '../wrapper';
12
12
  const INTEGRATION_NAME = 'LogEnricher';
13
13
  export const logEnricherIntegration = () => {
@@ -32,11 +32,11 @@ let NativeCache = undefined;
32
32
  *
33
33
  * @param logAttributes - The log attributes object to modify.
34
34
  * @param key - The attribute key to set.
35
- * @param value - The value to set (only sets if truthy and key not present).
35
+ * @param value - The value to set (only sets if not null/undefined and key not present).
36
36
  * @param setEvenIfPresent - Whether to set the attribute if it is present. Defaults to true.
37
37
  */
38
38
  function setLogAttribute(logAttributes, key, value, setEvenIfPresent = true) {
39
- if (value && (!logAttributes[key] || setEvenIfPresent)) {
39
+ if (value != null && (!logAttributes[key] || setEvenIfPresent)) {
40
40
  logAttributes[key] = value;
41
41
  }
42
42
  }
@@ -69,6 +69,12 @@ function processLog(log, client) {
69
69
  }
70
70
  // Save log.attributes to a new variable
71
71
  const logAttributes = (_a = log.attributes) !== null && _a !== void 0 ? _a : {};
72
+ // Apply scope attributes from all active scopes (global, isolation, and current)
73
+ // These are applied first so they can be overridden by more specific attributes
74
+ const scopeAttributes = collectScopeAttributes();
75
+ Object.keys(scopeAttributes).forEach((key) => {
76
+ setLogAttribute(logAttributes, key, scopeAttributes[key], false);
77
+ });
72
78
  // Use setLogAttribute with the variable instead of direct assignment
73
79
  setLogAttribute(logAttributes, 'device.brand', NativeCache.brand);
74
80
  setLogAttribute(logAttributes, 'device.model', NativeCache.model);
@@ -81,4 +87,38 @@ function processLog(log, client) {
81
87
  // Set log.attributes to the variable
82
88
  log.attributes = logAttributes;
83
89
  }
90
+ /**
91
+ * Extracts primitive attributes from a scope and merges them into the target object.
92
+ * Only string, number, and boolean attribute values are included.
93
+ *
94
+ * @param scope - The scope to extract attributes from
95
+ * @param target - The target object to merge attributes into
96
+ */
97
+ function extractScopeAttributes(scope, target) {
98
+ var _a;
99
+ if (scope && typeof scope.getScopeData === 'function') {
100
+ const scopeAttrs = ((_a = scope === null || scope === void 0 ? void 0 : scope.getScopeData) === null || _a === void 0 ? void 0 : _a.call(scope).attributes) || {};
101
+ Object.keys(scopeAttrs).forEach(key => {
102
+ const value = scopeAttrs[key];
103
+ if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
104
+ target[key] = value;
105
+ }
106
+ });
107
+ }
108
+ }
109
+ /**
110
+ * Collects attributes from all active scopes (global, isolation, and current).
111
+ * Only string, number, and boolean attribute values are supported.
112
+ * Attributes are merged in order of precedence: global < isolation < current.
113
+ *
114
+ * @returns A merged object containing all scope attributes.
115
+ */
116
+ function collectScopeAttributes() {
117
+ const attributes = {};
118
+ // Collect attributes from all scopes in order of precedence
119
+ extractScopeAttributes(getGlobalScope(), attributes);
120
+ extractScopeAttributes(getIsolationScope(), attributes);
121
+ extractScopeAttributes(getCurrentScope(), attributes);
122
+ return attributes;
123
+ }
84
124
  //# sourceMappingURL=logEnricherIntegration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logEnricherIntegration.js","sourceRoot":"","sources":["../../../src/js/integrations/logEnricherIntegration.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAEvC,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAgB,EAAE;IACtD,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,KAAK,CAAC,MAAyB;YAC7B,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE;gBAC1B,eAAe,EAAE,CAAC,IAAI,CACpB,GAAG,EAAE;oBACH,MAAM,CAAC,EAAE,CAAC,kBAAkB,EAAE,CAAC,GAAQ,EAAE,EAAE;wBACzC,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;oBAC1B,CAAC,CAAC,CAAC;gBACL,CAAC,EACD,MAAM,CAAC,EAAE;oBACP,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBACpB,CAAC,CACF,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,IAAI,WAAW,GAAwC,SAAS,CAAC;AAEjE;;;;;;;GAOG;AACH,SAAS,eAAe,CACtB,aAAsC,EACtC,GAAW,EACX,KAAc,EACd,gBAAgB,GAAG,IAAI;IAEvB,IAAI,KAAK,IAAI,CAAC,C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AAA,GAAG,CAAC,UAAU,mCAAI,EAAE,CAAC;IAE3C,qEAAqE;IACrE,eAAe,CAAC,aAAa,EAAE,cAAc,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAClE,eAAe,CAAC,aAAa,EAAE,cAAc,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAClE,eAAe,CAAC,aAAa,EAAE,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACpE,eAAe,CAAC,aAAa,EAAE,SAAS,EAAE,WAAW,CAAC,EAAE,CAAC,CAAC;IAC1D,eAAe,CAAC,aAAa,EAAE,YAAY,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAClE,eAAe,CAAC,aAAa,EAAE,gBAAgB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAEtE,MAAM,MAAM,GAAG,MAAM,CAAC,oBAAoB,CAAqD,cAAc,CAAC,CAAC;IAC/G,eAAe,CAAC,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW,EAAE,CAAC,CAAC;IAE1E,qCAAqC;IACrC,GAAG,CAAC,UAAU,GAAG,aAAa,CAAC;AACjC,CAAC","sourcesContent":["/* eslint-disable complexity */\nimport type { Integration, Log } from '@sentry/core';\nimport { debug } from '@sentry/core';\nimport type { ReactNativeClient } from '../client';\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'LogEnricher';\n\nexport const logEnricherIntegration = (): Integration => {\n return {\n name: INTEGRATION_NAME,\n setup(client: ReactNativeClient) {\n client.on('afterInit', () => {\n cacheLogContext().then(\n () => {\n client.on('beforeCaptureLog', (log: Log) => {\n processLog(log, client);\n });\n },\n reason => {\n debug.log(reason);\n },\n );\n });\n },\n };\n};\n\nlet NativeCache: Record<string, unknown> | undefined = undefined;\n\n/**\n * Sets a log attribute if the value exists and the attribute key is not already present.\n *\n * @param logAttributes - The log attributes object to modify.\n * @param key - The attribute key to set.\n * @param value - The value to set (only sets if truthy and key not present).\n * @param setEvenIfPresent - Whether to set the attribute if it is present. Defaults to true.\n */\nfunction setLogAttribute(\n logAttributes: Record<string, unknown>,\n key: string,\n value: unknown,\n setEvenIfPresent = true,\n): void {\n if (value && (!logAttributes[key] || setEvenIfPresent)) {\n logAttributes[key] = value;\n }\n}\n\nasync function cacheLogContext(): Promise<void> {\n try {\n const response = await NATIVE.fetchNativeLogAttributes();\n\n NativeCache = {\n ...(response?.contexts?.device && {\n brand: response.contexts.device?.brand,\n model: response.contexts.device?.model,\n family: response.contexts.device?.family,\n }),\n ...(response?.contexts?.os && {\n os: response.contexts.os.name,\n version: response.contexts.os.version,\n }),\n ...(response?.contexts?.release && {\n release: response.contexts.release,\n }),\n };\n } catch (e) {\n return Promise.reject(`[LOGS]: Failed to prepare attributes from Native Layer: ${e}`);\n }\n return Promise.resolve();\n}\n\nfunction processLog(log: Log, client: ReactNativeClient): void {\n if (NativeCache === undefined) {\n return;\n }\n\n // Save log.attributes to a new variable\n const logAttributes = log.attributes ?? {};\n\n // Use setLogAttribute with the variable instead of direct assignment\n setLogAttribute(logAttributes, 'device.brand', NativeCache.brand);\n setLogAttribute(logAttributes, 'device.model', NativeCache.model);\n setLogAttribute(logAttributes, 'device.family', NativeCache.family);\n setLogAttribute(logAttributes, 'os.name', NativeCache.os);\n setLogAttribute(logAttributes, 'os.version', NativeCache.version);\n setLogAttribute(logAttributes, 'sentry.release', NativeCache.release);\n\n const replay = client.getIntegrationByName<Integration & { getReplayId: () => string | null }>('MobileReplay');\n setLogAttribute(logAttributes, 'sentry.replay_id', replay?.getReplayId());\n\n // Set log.attributes to the variable\n log.attributes = logAttributes;\n}\n"]}
1
+ {"version":3,"file":"logEnricherIntegration.js","sourceRoot":"","sources":["../../../src/js/integrations/logEnricherIntegration.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEzF,OAAO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AEjE,4DAA4D;IAC5D,sBAAsB,CAAC,cAAc,EAAE,EAAE,UAAU,CAAC,CAAC;IACrD,sBAAsB,CAAC,iBAAiB,EAAE,EAAE,UAAU,CAAC,CAAC;IACxD,sBAAsB,CAAC,eAAe,EAAE,EAAE,UAAU,CAAC,CAAC;IAEtD,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["/* eslint-disable complexity */\nimport type { Integration, Log } from '@sentry/core';\nimport { debug, getCurrentScope, getGlobalScope, getIsolationScope } from '@sentry/core';\nimport type { ReactNativeClient } from '../client';\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'LogEnricher';\n\nexport const logEnricherIntegration = (): Integration => {\n return {\n name: INTEGRATION_NAME,\n setup(client: ReactNativeClient) {\n client.on('afterInit', () => {\n cacheLogContext().then(\n () => {\n client.on('beforeCaptureLog', (log: Log) => {\n processLog(log, client);\n });\n },\n reason => {\n debug.log(reason);\n },\n );\n });\n },\n };\n};\n\nlet NativeCache: Record<string, unknown> | undefined = undefined;\n\n/**\n * Sets a log attribute if the value exists and the attribute key is not already present.\n *\n * @param logAttributes - The log attributes object to modify.\n * @param key - The attribute key to set.\n * @param value - The value to set (only sets if not null/undefined and key not present).\n * @param setEvenIfPresent - Whether to set the attribute if it is present. Defaults to true.\n */\nfunction setLogAttribute(\n logAttributes: Record<string, unknown>,\n key: string,\n value: unknown,\n setEvenIfPresent = true,\n): void {\n if (value != null && (!logAttributes[key] || setEvenIfPresent)) {\n logAttributes[key] = value;\n }\n}\n\nasync function cacheLogContext(): Promise<void> {\n try {\n const response = await NATIVE.fetchNativeLogAttributes();\n\n NativeCache = {\n ...(response?.contexts?.device && {\n brand: response.contexts.device?.brand,\n model: response.contexts.device?.model,\n family: response.contexts.device?.family,\n }),\n ...(response?.contexts?.os && {\n os: response.contexts.os.name,\n version: response.contexts.os.version,\n }),\n ...(response?.contexts?.release && {\n release: response.contexts.release,\n }),\n };\n } catch (e) {\n return Promise.reject(`[LOGS]: Failed to prepare attributes from Native Layer: ${e}`);\n }\n return Promise.resolve();\n}\n\nfunction processLog(log: Log, client: ReactNativeClient): void {\n if (NativeCache === undefined) {\n return;\n }\n\n // Save log.attributes to a new variable\n const logAttributes = log.attributes ?? {};\n\n // Apply scope attributes from all active scopes (global, isolation, and current)\n // These are applied first so they can be overridden by more specific attributes\n const scopeAttributes = collectScopeAttributes();\n Object.keys(scopeAttributes).forEach((key: string) => {\n setLogAttribute(logAttributes, key, scopeAttributes[key], false);\n });\n\n // Use setLogAttribute with the variable instead of direct assignment\n setLogAttribute(logAttributes, 'device.brand', NativeCache.brand);\n setLogAttribute(logAttributes, 'device.model', NativeCache.model);\n setLogAttribute(logAttributes, 'device.family', NativeCache.family);\n setLogAttribute(logAttributes, 'os.name', NativeCache.os);\n setLogAttribute(logAttributes, 'os.version', NativeCache.version);\n setLogAttribute(logAttributes, 'sentry.release', NativeCache.release);\n\n const replay = client.getIntegrationByName<Integration & { getReplayId: () => string | null }>('MobileReplay');\n setLogAttribute(logAttributes, 'sentry.replay_id', replay?.getReplayId());\n\n // Set log.attributes to the variable\n log.attributes = logAttributes;\n}\n\n/**\n * Extracts primitive attributes from a scope and merges them into the target object.\n * Only string, number, and boolean attribute values are included.\n *\n * @param scope - The scope to extract attributes from\n * @param target - The target object to merge attributes into\n */\nfunction extractScopeAttributes(\n scope: ReturnType<typeof getCurrentScope>,\n target: Record<string, string | number | boolean>,\n): void {\n if (scope && typeof scope.getScopeData === 'function') {\n const scopeAttrs = scope?.getScopeData?.().attributes || {};\n Object.keys(scopeAttrs).forEach(key => {\n const value = scopeAttrs[key];\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n target[key] = value;\n }\n });\n }\n}\n\n/**\n * Collects attributes from all active scopes (global, isolation, and current).\n * Only string, number, and boolean attribute values are supported.\n * Attributes are merged in order of precedence: global < isolation < current.\n *\n * @returns A merged object containing all scope attributes.\n */\nfunction collectScopeAttributes(): Record<string, string | number | boolean> {\n const attributes: Record<string, string | number | boolean> = {};\n\n // Collect attributes from all scopes in order of precedence\n extractScopeAttributes(getGlobalScope(), attributes);\n extractScopeAttributes(getIsolationScope(), attributes);\n extractScopeAttributes(getCurrentScope(), attributes);\n\n return attributes;\n}\n"]}
@@ -252,16 +252,25 @@ export interface BaseReactNativeOptions {
252
252
  * @platform ios
253
253
  */
254
254
  enableUnhandledCPPExceptionsV2?: boolean;
255
+ /**
256
+ * Configuration options for UI profiling.
257
+ * It supports two modes: `manual` and `trace`.
258
+ * - In `trace` mode, the profiler runs based on active sampled spans.
259
+ * - In `manual` mode, profiling is controlled via start/stop API calls.
260
+ *
261
+ * @experimental
262
+ */
263
+ profilingOptions?: ProfilingOptions;
255
264
  /**
256
265
  * Configuration options for Android UI profiling.
257
- * UI profiling supports two modes: `manual` and `trace`.
266
+ * It supports two modes: `manual` and `trace`.
258
267
  * - In `trace` mode, the profiler runs based on active sampled spans.
259
268
  * - In `manual` mode, profiling is controlled via start/stop API calls.
260
269
  *
261
270
  * @experimental
262
- * @platform android
271
+ * @deprecated Use `profilingOptions` instead. This option will be removed in the next major version.
263
272
  */
264
- androidProfilingOptions?: AndroidProfilingOptions;
273
+ androidProfilingOptions?: ProfilingOptions;
265
274
  };
266
275
  /**
267
276
  * This options changes the placement of the attached stacktrace of `captureMessage` in the event.
@@ -295,18 +304,17 @@ export interface BaseReactNativeOptions {
295
304
  }
296
305
  export type SentryReplayQuality = 'low' | 'medium' | 'high';
297
306
  /**
298
- * Android UI profiling lifecycle modes.
307
+ * UI profiling lifecycle modes.
299
308
  * - `trace`: Profiler runs based on active sampled spans
300
309
  * - `manual`: Profiler is controlled manually via start/stop API calls
301
310
  */
302
- export type AndroidProfilingLifecycle = 'trace' | 'manual';
311
+ export type ProfilingLifecycle = 'trace' | 'manual';
303
312
  /**
304
- * Configuration options for Android UI profiling.
313
+ * Configuration options for UI profiling.
305
314
  *
306
315
  * @experimental
307
- * @platform android
308
316
  */
309
- export interface AndroidProfilingOptions {
317
+ export interface ProfilingOptions {
310
318
  /**
311
319
  * Sample rate for profiling sessions.
312
320
  * This is evaluated once per session and determines if profiling should be enabled for that session.
@@ -320,9 +328,9 @@ export interface AndroidProfilingOptions {
320
328
  * - `trace`: Profiler runs while there is at least one active sampled span
321
329
  * - `manual`: Profiler is controlled manually via Sentry.profiler.startProfiler/stopProfiler
322
330
  *
323
- * @default 'trace'
331
+ * @default 'manual'
324
332
  */
325
- lifecycle?: AndroidProfilingLifecycle;
333
+ lifecycle?: ProfilingLifecycle;
326
334
  /**
327
335
  * Enable profiling on app start.
328
336
  * - In `trace` mode: The app start profile stops automatically when the app start root span finishes
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/js/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC7F,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAG7D,KAAK,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC3D,KAAK,uBAAuB,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;AAExE,KAAK,kBAAkB,GAAG,WAAW,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC;AACtE,KAAK,uBAAuB,GAAG,kBAAkB,CAAC;AAElD,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;;;;;;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