@coralogix/react-native-plugin 0.10.0 → 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 +11 -0
- package/CxSdk.podspec +3 -3
- package/android/src/main/java/com/cxsdk/CxSdkModule.kt +3 -1
- package/index.cjs.js +1 -3
- package/index.esm.js +1 -3
- package/ios/CxSdk.swift +7 -3
- package/package.json +1 -1
- package/src/model/NetworkRequestDetails.d.ts +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
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
|
+
|
|
1
12
|
## 0.10.0 (2026-08-10)
|
|
2
13
|
|
|
3
14
|
### ⬆️ 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.
|
|
20
|
-
s.dependency 'CoralogixInternal','2.
|
|
21
|
-
s.dependency 'SessionReplay','2.
|
|
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.
|
|
@@ -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
|
-
|
|
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.10.
|
|
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.10.
|
|
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
|
-
|
|
475
|
-
result["
|
|
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
|
@@ -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;
|