@coralogix/react-native-plugin 0.9.1 → 0.10.1

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 0.10.1 (2026-08-11)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - Network request events on iOS now report the real request duration, response body size, and status text — the duration value was previously written into the response-size field and never reached the SDK, and status text was not forwarded at all
6
+ - Network request events no longer carry an error-message field on any platform, matching the event schema — error details are reported through error events only
7
+
8
+ ### ⬆️ Dependency Updates
9
+
10
+ - Native iOS SDK bumped to **2.15.1** — network events reported from the JavaScript layer now honor the measured request duration and status text
11
+
12
+ ## 0.10.0 (2026-08-10)
13
+
14
+ ### ⬆️ Dependency Updates
15
+
16
+ - Native iOS SDK bumped to **2.14.0** — flushes buffered spans when the app enters the background
17
+ - Native Android SDK bumped to **2.21.1** — flushes buffered events when the app enters the background, realigns interaction masking with the web SDK, reports network request durations in milliseconds (requests bridged from React Native no longer show a duration of 0), and removes an ANR risk from per-touch-event logging
18
+
1
19
  ## 0.9.1 (2026-08-06)
2
20
 
3
21
  ### ⬆️ Dependency Updates
package/CxSdk.podspec CHANGED
@@ -16,9 +16,9 @@ Pod::Spec.new do |s|
16
16
 
17
17
  s.source_files = "ios/**/*.{h,m,mm,swift}"
18
18
 
19
- s.dependency 'Coralogix','2.13.3'
20
- s.dependency 'CoralogixInternal','2.13.3'
21
- s.dependency 'SessionReplay','2.13.3'
19
+ s.dependency 'Coralogix','2.15.1'
20
+ s.dependency 'CoralogixInternal','2.15.1'
21
+ s.dependency 'SessionReplay','2.15.1'
22
22
 
23
23
  # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
24
24
  # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
@@ -84,7 +84,7 @@ dependencies {
84
84
  implementation "com.facebook.react:react-android"
85
85
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
86
86
 
87
- implementation "com.coralogix:android-sdk:2.19.4"
87
+ implementation "com.coralogix:android-sdk:2.21.1"
88
88
 
89
89
  testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
90
90
  testImplementation "org.mockito:mockito-core:5.12.0"
@@ -856,7 +856,9 @@ class CxSdkModule(reactContext: ReactApplicationContext) :
856
856
  duration = if (hasKey("duration")) getDouble("duration").toLong() else 0,
857
857
  responseContentLength = if (hasKey("responseContentLength"))
858
858
  getDouble("responseContentLength").toLong() else 0,
859
- errorMessage = getString("errorMessage"),
859
+ // Intentionally not read from the bridge: the network event schema has no
860
+ // error_message field — error details belong to error events only.
861
+ errorMessage = null,
860
862
  traceId = getString("customTraceId"),
861
863
  spanId = getString("customSpanId"),
862
864
  requestHeaders = if (hasKey("request_headers") && !isNull("request_headers"))
package/index.cjs.js CHANGED
@@ -577,7 +577,7 @@ function stopJsRefreshRateSampler() {
577
577
  appStateSub = null;
578
578
  }
579
579
 
580
- var version = "0.9.1";
580
+ var version = "0.10.1";
581
581
  var pkg = {
582
582
  version: version};
583
583
 
@@ -870,7 +870,6 @@ class CoralogixFetchInstrumentation extends instrumentationFetch.FetchInstrument
870
870
  const responseContentLength = attrs[OtelNetworkAttrs.RESPONSE_CONTENT_LENGTH] || 0;
871
871
  const duration = hrTimeToMilliseconds(readableSpan.duration);
872
872
  const fragments = getUrlFragments(url);
873
- const errorMessage = result.message;
874
873
  const customTraceId = readableSpan.spanContext().traceId;
875
874
  const customSpanId = readableSpan.spanContext().spanId;
876
875
  const parsed = new URL(url);
@@ -887,7 +886,6 @@ class CoralogixFetchInstrumentation extends instrumentationFetch.FetchInstrument
887
886
  statusText,
888
887
  duration,
889
888
  responseContentLength,
890
- errorMessage,
891
889
  customTraceId,
892
890
  customSpanId
893
891
  };
package/index.esm.js CHANGED
@@ -575,7 +575,7 @@ function stopJsRefreshRateSampler() {
575
575
  appStateSub = null;
576
576
  }
577
577
 
578
- var version = "0.9.1";
578
+ var version = "0.10.1";
579
579
  var pkg = {
580
580
  version: version};
581
581
 
@@ -868,7 +868,6 @@ class CoralogixFetchInstrumentation extends FetchInstrumentation {
868
868
  const responseContentLength = attrs[OtelNetworkAttrs.RESPONSE_CONTENT_LENGTH] || 0;
869
869
  const duration = hrTimeToMilliseconds(readableSpan.duration);
870
870
  const fragments = getUrlFragments(url);
871
- const errorMessage = result.message;
872
871
  const customTraceId = readableSpan.spanContext().traceId;
873
872
  const customSpanId = readableSpan.spanContext().spanId;
874
873
  const parsed = new URL(url);
@@ -885,7 +884,6 @@ class CoralogixFetchInstrumentation extends FetchInstrumentation {
885
884
  statusText,
886
885
  duration,
887
886
  responseContentLength,
888
- errorMessage,
889
887
  customTraceId,
890
888
  customSpanId
891
889
  };
package/ios/CxSdk.swift CHANGED
@@ -175,7 +175,6 @@ class CxSdk: RCTEventEmitter {
175
175
  }
176
176
 
177
177
  let cxNetworkDict = toCoralogixNetwork(dictionary: dictionary)
178
- print("[CX DEBUG] cxNetworkDict response_payload: \( cxNetworkDict)")
179
178
  coralogixRum?.setNetworkRequestContext(dictionary: cxNetworkDict)
180
179
  resolve("reportNetworkRequest success")
181
180
  }
@@ -471,12 +470,17 @@ class CxSdk: RCTEventEmitter {
471
470
  result["url"] = dictionary["url"] as? String ?? ""
472
471
  result["host"] = dictionary["host"] as? String ?? ""
473
472
  result["method"] = dictionary["method"] as? String ?? ""
474
- result["status_code"] = dictionary["statusCode"] as? Int ?? 0
475
- result["http_response_body_size"] = dictionary["duration"] as? Int ?? 0
473
+ // JS numbers cross the bridge as NSNumber doubles; coerce instead of an exact-Int cast.
474
+ result["status_code"] = (dictionary["statusCode"] as? NSNumber)?.intValue ?? 0
475
+ result["status_text"] = dictionary["statusText"] as? String ?? ""
476
+ result["duration"] = (dictionary["duration"] as? NSNumber)?.doubleValue ?? 0
477
+ result["http_response_body_size"] = (dictionary["responseContentLength"] as? NSNumber)?.intValue ?? 0
476
478
  result["fragments"] = dictionary["fragments"] as? String ?? ""
477
479
  result["schema"] = dictionary["schema"] as? String ?? ""
478
480
  result["customTraceId"] = dictionary["customTraceId"] as? String ?? ""
479
481
  result["customSpanId"] = dictionary["customSpanId"] as? String ?? ""
482
+ // errorMessage is intentionally not forwarded: the network event schema has no
483
+ // error_message field — error details belong to error events only.
480
484
  if let v = dictionary["request_headers"] as? [String: String] { result["request_headers"] = v }
481
485
  if let v = dictionary["response_headers"] as? [String: String] { result["response_headers"] = v }
482
486
  if let v = dictionary["request_payload"] as? String { result["request_payload"] = v }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coralogix/react-native-plugin",
3
- "version": "0.9.1",
3
+ "version": "0.10.1",
4
4
  "description": "Official Coralogix React Native plugin",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Coralogix",
@@ -8,6 +8,11 @@ export type NetworkRequestDetails = {
8
8
  statusText: string;
9
9
  duration: number;
10
10
  responseContentLength: number;
11
+ /**
12
+ * @deprecated Ignored. The network event schema has no error field — error
13
+ * details are reported through error events only. Kept for source
14
+ * compatibility; neither platform forwards it.
15
+ */
11
16
  errorMessage?: string | null;
12
17
  customTraceId: string;
13
18
  customSpanId: string;