@tracescout/browser 2.2.0-beta.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 +25 -0
- package/LICENSE +85 -0
- package/README.md +82 -0
- package/dist/tracescout.esm.min.js +1 -0
- package/dist/tracescout.min.js +1 -0
- package/package.json +72 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 2.2.0-beta.0 — 2026-07-15
|
|
4
|
+
|
|
5
|
+
First public npm release (`@tracescout/browser`, beta). Published with an
|
|
6
|
+
explicit `beta` dist-tag; `latest` is not assigned.
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
- **SSR-import safety:** the fetch interceptor no longer binds `window.fetch` at
|
|
10
|
+
module load, so `import '@tracescout/browser'` is safe in a Node/SSR context
|
|
11
|
+
(e.g. Next.js). Runtime behavior in the browser is unchanged. Required for
|
|
12
|
+
correct npm packaging; no other runtime change.
|
|
13
|
+
|
|
14
|
+
### Included from 2.1.x
|
|
15
|
+
- Same-origin-only trace/baggage propagation (third-party origins and the SDK's
|
|
16
|
+
own ingest endpoints receive neither; existing `traceparent` preserved).
|
|
17
|
+
- Session replay, console/error capture, Web Vitals, fetch/XHR capture with
|
|
18
|
+
header sanitization; v1 project-scoped event contract.
|
|
19
|
+
|
|
20
|
+
### Packaging
|
|
21
|
+
- Distributed as compiled, minified bundles: `dist/tracescout.esm.min.js` (ESM)
|
|
22
|
+
and `dist/tracescout.min.js` (UMD). Function/class names preserved; no
|
|
23
|
+
property-name mangling; no source maps in the package; no TypeScript sources,
|
|
24
|
+
tests, or internal docs shipped. The npm package and the versioned CDN artifact
|
|
25
|
+
are built from the same release commit.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
TRACESCOUT BROWSER SDK LICENSE (BETA)
|
|
2
|
+
|
|
3
|
+
Copyright 2026 TraceScout. All rights reserved.
|
|
4
|
+
|
|
5
|
+
IMPORTANT: This is proprietary beta license language provided for use with the
|
|
6
|
+
@tracescout/browser beta releases. It should receive review by qualified legal
|
|
7
|
+
counsel before any general-availability release.
|
|
8
|
+
|
|
9
|
+
1. DEFINITIONS
|
|
10
|
+
"SDK" means the @tracescout/browser software package, in object code /
|
|
11
|
+
compiled form, including its bundled files, type declarations, and
|
|
12
|
+
accompanying documentation.
|
|
13
|
+
"TraceScout Service" means the hosted observability services offered by
|
|
14
|
+
TraceScout, including its ingestion APIs and dashboards.
|
|
15
|
+
"You" means the individual or entity installing or using the SDK.
|
|
16
|
+
|
|
17
|
+
2. LICENSE GRANT
|
|
18
|
+
Subject to your compliance with this license, TraceScout grants you a
|
|
19
|
+
limited, non-exclusive, non-transferable, non-sublicensable, revocable
|
|
20
|
+
right to install and use the SDK, in unmodified object code form only,
|
|
21
|
+
solely to integrate your applications with, and to use, the TraceScout
|
|
22
|
+
Service under a valid TraceScout account. No other rights are granted,
|
|
23
|
+
whether by implication, estoppel, or otherwise.
|
|
24
|
+
|
|
25
|
+
3. RESTRICTIONS
|
|
26
|
+
Except as expressly permitted in Section 2, you shall not, and shall not
|
|
27
|
+
permit or assist any third party to:
|
|
28
|
+
(a) redistribute, publish, sublicense, rent, lease, sell, or otherwise
|
|
29
|
+
transfer the SDK or any part of it;
|
|
30
|
+
(b) modify, adapt, translate, or create derivative works of the SDK;
|
|
31
|
+
(c) disclose, publish, or otherwise make available the SDK's source code
|
|
32
|
+
or any non-public aspect of its design or implementation;
|
|
33
|
+
(d) use the SDK, or any knowledge of its operation, to build, train,
|
|
34
|
+
improve, or assist a product or service that competes with the
|
|
35
|
+
TraceScout Service;
|
|
36
|
+
(e) reverse engineer, decompile, or disassemble the SDK, except and only
|
|
37
|
+
to the extent that such restriction is prohibited or rendered
|
|
38
|
+
unenforceable by applicable law notwithstanding this limitation;
|
|
39
|
+
(f) remove, alter, or obscure any copyright, trademark, or other
|
|
40
|
+
proprietary notice included with the SDK; or
|
|
41
|
+
(g) use the SDK other than in connection with the TraceScout Service.
|
|
42
|
+
|
|
43
|
+
4. OWNERSHIP
|
|
44
|
+
The SDK is licensed, not sold. TraceScout and its licensors retain all
|
|
45
|
+
right, title, and interest in and to the SDK, including all intellectual
|
|
46
|
+
property rights. All rights not expressly granted are reserved.
|
|
47
|
+
|
|
48
|
+
5. BETA SOFTWARE
|
|
49
|
+
The SDK is provided as beta software. It may contain defects, may change
|
|
50
|
+
materially between releases without notice, and may be discontinued.
|
|
51
|
+
TraceScout may suspend or terminate this license at any time.
|
|
52
|
+
|
|
53
|
+
6. FEEDBACK
|
|
54
|
+
If you provide feedback about the SDK, you grant TraceScout a perpetual,
|
|
55
|
+
irrevocable, worldwide, royalty-free right to use that feedback without
|
|
56
|
+
restriction or obligation to you.
|
|
57
|
+
|
|
58
|
+
7. NO WARRANTY
|
|
59
|
+
THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE," WITHOUT WARRANTY OF ANY
|
|
60
|
+
KIND, EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, INCLUDING WITHOUT
|
|
61
|
+
LIMITATION ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
62
|
+
PURPOSE, TITLE, NON-INFRINGEMENT, OR THAT THE SDK WILL BE UNINTERRUPTED,
|
|
63
|
+
ERROR-FREE, OR SECURE. YOU USE THE SDK AT YOUR OWN RISK.
|
|
64
|
+
|
|
65
|
+
8. LIMITATION OF LIABILITY
|
|
66
|
+
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL
|
|
67
|
+
TRACESCOUT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL,
|
|
68
|
+
EXEMPLARY, OR PUNITIVE DAMAGES, OR FOR ANY LOSS OF PROFITS, REVENUE, DATA,
|
|
69
|
+
OR GOODWILL, ARISING OUT OF OR RELATING TO THE SDK OR THIS LICENSE,
|
|
70
|
+
HOWEVER CAUSED AND UNDER ANY THEORY OF LIABILITY, EVEN IF ADVISED OF THE
|
|
71
|
+
POSSIBILITY OF SUCH DAMAGES. TRACESCOUT'S TOTAL AGGREGATE LIABILITY
|
|
72
|
+
ARISING OUT OF OR RELATING TO THE SDK OR THIS LICENSE WILL NOT EXCEED
|
|
73
|
+
ONE HUNDRED U.S. DOLLARS (US $100).
|
|
74
|
+
|
|
75
|
+
9. TERMINATION
|
|
76
|
+
This license terminates automatically if you breach it. Upon termination
|
|
77
|
+
you must cease all use of the SDK and delete all copies. Sections 3, 4,
|
|
78
|
+
and 6 through 10 survive termination.
|
|
79
|
+
|
|
80
|
+
10. GENERAL
|
|
81
|
+
If any provision of this license is held unenforceable, the remaining
|
|
82
|
+
provisions remain in full force. Failure to enforce a provision is not a
|
|
83
|
+
waiver. This license constitutes the entire agreement between you and
|
|
84
|
+
TraceScout concerning the SDK and supersedes any prior understanding
|
|
85
|
+
regarding its subject matter.
|
package/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# @tracescout/browser
|
|
2
|
+
|
|
3
|
+
Browser SDK for TraceScout: session replay, error & console capture, Web Vitals,
|
|
4
|
+
and automatic fetch/XHR network capture — with W3C trace-context correlation to
|
|
5
|
+
your backend logs. **Beta.**
|
|
6
|
+
|
|
7
|
+
Only a **public project ID** is required in the browser. **Never put a private
|
|
8
|
+
ingest key, admin credential, or server secret in browser code** — the browser
|
|
9
|
+
SDK does not use or accept one.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
### npm (bundlers: React, Vite, Next.js, Vue, Angular)
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @tracescout/browser@beta
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
import TraceScout from '@tracescout/browser';
|
|
21
|
+
|
|
22
|
+
TraceScout.init('YOUR_PROJECT_ID');
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
- ESM (`dist/tracescout.esm.min.js`) is used by bundlers; a UMD build
|
|
26
|
+
(`dist/tracescout.min.js`) covers CommonJS/`require` and `<script>`.
|
|
27
|
+
- **SSR-safe import:** importing the package on the server does not touch
|
|
28
|
+
`window`. Call `init()` only in the browser (e.g. a Next.js client component
|
|
29
|
+
or inside `useEffect`).
|
|
30
|
+
|
|
31
|
+
### Direct `<script>` / CDN (version-pinned)
|
|
32
|
+
|
|
33
|
+
Pin an **immutable, versioned** URL in production — do not use an unversioned
|
|
34
|
+
"latest" URL for production customers:
|
|
35
|
+
|
|
36
|
+
```html
|
|
37
|
+
<script src="https://cdn.tracescout.com/sdk/v2.2.0-beta.0/tracescout.min.js"></script>
|
|
38
|
+
<script>TraceScout.init('YOUR_PROJECT_ID');</script>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The CDN artifact at a given version is built from the same release commit as the
|
|
42
|
+
npm package of that version, so they never differ behaviorally.
|
|
43
|
+
|
|
44
|
+
## What it captures
|
|
45
|
+
|
|
46
|
+
- **Session replay** (rrweb), **console** and **JS errors**, **Web Vitals**,
|
|
47
|
+
and **fetch / XHR** requests (method, URL, status, timing, and — for API
|
|
48
|
+
calls — headers and bodies), shown in the TraceScout dashboard.
|
|
49
|
+
- **Header sanitization:** credential-bearing request/response headers
|
|
50
|
+
(`authorization`, `cookie`, `x-api-key`, …) are redacted before capture.
|
|
51
|
+
|
|
52
|
+
## Trace propagation (safe by default)
|
|
53
|
+
|
|
54
|
+
- A W3C `traceparent` header is added to **same-origin** outbound `fetch`/`XHR`
|
|
55
|
+
requests so browser activity correlates with your backend traces.
|
|
56
|
+
- **An existing valid `traceparent` is never overwritten.**
|
|
57
|
+
- **Third-party origins receive no `traceparent` and no TraceScout baggage** —
|
|
58
|
+
your `sessionId`/`userId`/`projectId` are never sent to other hosts, and no
|
|
59
|
+
CORS preflight is added to cross-origin calls.
|
|
60
|
+
- **Trusted cross-origin propagation is not enabled in this beta.** If your app
|
|
61
|
+
calls a different-origin backend and you need the trace linked across it, that
|
|
62
|
+
is a separate, explicit configuration (not yet available) — same-origin is the
|
|
63
|
+
default.
|
|
64
|
+
- The SDK never instruments its own ingestion requests.
|
|
65
|
+
|
|
66
|
+
## Public API
|
|
67
|
+
|
|
68
|
+
```js
|
|
69
|
+
TraceScout.init('YOUR_PROJECT_ID', { environment: 'production' });
|
|
70
|
+
TraceScout.identify('user_123', { plan: 'pro' });
|
|
71
|
+
TraceScout.track('checkout_completed', { total: 42 });
|
|
72
|
+
TraceScout.setUserMetadata({ plan: 'pro' });
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Version / CDN alignment
|
|
76
|
+
|
|
77
|
+
The npm version and the CDN `…/sdk/v<version>/…` path are produced from the same
|
|
78
|
+
release commit. Pin the same version in both places.
|
|
79
|
+
|
|
80
|
+
## Docs
|
|
81
|
+
|
|
82
|
+
https://docs.tracescout.com/docs/getting-started/installation
|