@coralogix/browser 3.24.0 → 4.0.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ # 4.0.0 (2026-09-27)
2
+
3
+ ### ⚠️ Breaking Changes
4
+
5
+ - The npm package is now published as ES2022 instead of ES5. If you support browsers older than ES2022, transpile `@coralogix/browser` as part of your own build, or load the ES5 CDN bundle instead — that bundle is unchanged
6
+ - The default CDN bundle is now built to ES2022, up from ES2015. Use the ES5 CDN bundle if you support older browsers
7
+ - The HTTP attributes on network spans are renamed onto the stable OpenTelemetry semantic conventions: `http.method` → `http.request.method`, `http.url` → `url.full`, `http.status_code` → `http.response.status_code`, `http.host` → `server.address`. This affects you only if you read the raw OpenTelemetry span attributes, which reach you through a `tracesExporter` callback. `network_request_context` — what `beforeSend` receives — keeps the same fields and values, apart from `status_text` below
8
+ - `status_text` now reports the standard reason phrase for the status code — `Service Unavailable` for 503 — rather than the phrase the server sent, because HTTP/2 and HTTP/3 carry no reason phrase on the wire at all
9
+ - `response_content_length` is now a `number` instead of a `string`
10
+
11
+ ### 🚀 Features
12
+
13
+ - Upgrade OpenTelemetry to 2.x, moving network spans onto the stable HTTP semantic conventions
14
+ - Report `response_content_length` from the `Content-Length` header, so cross-origin requests are now covered; it is unset when the server omits the header
15
+
16
+ ### 🩹 Fixes
17
+
18
+ - Report a `status_text` for XHR requests that fail outright — offline, blocked by CORS, aborted or timed out — where it was previously left empty. XHR carries no reason for such a failure, so these report `Unknown`; a failed `fetch` reports the browser's own message, as before
19
+ - Ignore a malformed `Content-Length` header instead of reporting a misleading response size
20
+
1
21
  ## 3.24.0 (2026-09-23)
2
22
 
3
23
  ### 🚀 Features
package/LICENSE CHANGED
@@ -199,3 +199,68 @@
199
199
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
200
  See the License for the specific language governing permissions and
201
201
  limitations under the License.
202
+
203
+
204
+ ================================================================================
205
+ THIRD-PARTY NOTICES
206
+ ================================================================================
207
+
208
+ This distribution contains code derived from the projects below. Their notices
209
+ are reproduced here as their licenses require for binary distribution; the code
210
+ itself is vendored into this package rather than installed as a dependency.
211
+
212
+ --------------------------------------------------------------------------------
213
+ shimmer 1.2.1 — https://github.com/othiym23/shimmer
214
+ Vendored at src/tools/cx-shimmer.ts
215
+ --------------------------------------------------------------------------------
216
+
217
+ Copyright (c) 2013-2019, Forrest L Norvell
218
+ All rights reserved.
219
+
220
+ Redistribution and use in source and binary forms, with or without
221
+ modification, are permitted provided that the following conditions are met:
222
+
223
+ * Redistributions of source code must retain the above copyright notice, this
224
+ list of conditions and the following disclaimer.
225
+
226
+ * Redistributions in binary form must reproduce the above copyright notice,
227
+ this list of conditions and the following disclaimer in the documentation
228
+ and/or other materials provided with the distribution.
229
+
230
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
231
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
232
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
233
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
234
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
235
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
236
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
237
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
238
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
239
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
240
+
241
+ --------------------------------------------------------------------------------
242
+ rrweb — https://github.com/rrweb-io/rrweb
243
+ Vendored at src/cx-rrweb/
244
+ --------------------------------------------------------------------------------
245
+
246
+ MIT License
247
+
248
+ Copyright (c) 2018 Contributors (https://github.com/rrweb-io/rrweb/graphs/contributors)
249
+
250
+ Permission is hereby granted, free of charge, to any person obtaining a copy
251
+ of this software and associated documentation files (the "Software"), to deal
252
+ in the Software without restriction, including without limitation the rights
253
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
254
+ copies of the Software, and to permit persons to whom the Software is
255
+ furnished to do so, subject to the following conditions:
256
+
257
+ The above copyright notice and this permission notice shall be included in all
258
+ copies or substantial portions of the Software.
259
+
260
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
261
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
262
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
263
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
264
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
265
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
266
+ SOFTWARE.
package/README.md CHANGED
@@ -96,6 +96,13 @@
96
96
  JavaScript / TypeScript Frameworks: React, Angular, Vue, NextJS and more.<br>
97
97
  Flutter (Currently only web).
98
98
 
99
+ ### JavaScript language level
100
+
101
+ Version 4.0.0 and later publish the npm package as **ES2022**. Versions up to 3.24.0 published ES5.
102
+
103
+ If you support browsers older than ES2022, transpile the package as part of your own build, or load
104
+ the [ES5](#es5) CDN bundle instead.
105
+
99
106
  ## Usage
100
107
 
101
108
  To use Coralogix SDK for Browsers, call `CoralogixRum.init(options)` at the soonest available moment after the page load.
@@ -1301,7 +1308,8 @@ You can choose your desired version.
1301
1308
 
1302
1309
  #### Specific Version (recommended)
1303
1310
 
1304
- By default, the CDN is built using the <b>ES2015 (ES6)</b> standard.<br>
1311
+ From 4.0.0 the default bundle is built to the <b>ES2022</b> standard, up from ES2015. If you support
1312
+ older environments, use the [ES5](#es5) bundle below.
1305
1313
 
1306
1314
  https://cdn.rum-ingress-coralogix.com/coralogix/browser/[version]/coralogix-browser-sdk.js \
1307
1315
  Replace [version] with a version from [Releases page](https://www.npmjs.com/package/@coralogix/browser?activeTab=versions).
package/index.esm.js CHANGED
@@ -1,5 +1,4 @@
1
1
  export { x as CoralogixEventType, v as CoralogixLogSeverity, u as CoralogixRum, O as OtelNetworkAttrs, y as PerformanceTypes, w as SessionRecordingEventType, U as UrlBasedLabelProvider, z as UrlType } from './index.esm2.js';
2
- import 'tslib';
3
2
  import '@opentelemetry/sdk-trace-base';
4
3
  import '@opentelemetry/sdk-trace-web';
5
4
  import '@opentelemetry/instrumentation';
@@ -8,6 +7,7 @@ import '@opentelemetry/instrumentation-fetch';
8
7
  import '@opentelemetry/instrumentation-xml-http-request';
9
8
  import 'web-vitals/attribution';
10
9
  import 'web-vitals';
10
+ import '@opentelemetry/core';
11
11
  import '@opentelemetry/api';
12
12
  import '@opentelemetry/propagator-b3';
13
13
  import '@opentelemetry/propagator-aws-xray';