@edraj/sauron-node 1.4.0 → 1.6.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 +50 -0
- package/COPYING +674 -0
- package/LICENSE +160 -656
- package/README.md +154 -12
- package/dist/client.js +15 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -0
- package/dist/transaction-extra.d.ts +36 -0
- package/dist/transaction-extra.js +53 -0
- package/dist/transport.js +1 -1
- package/dist/types.d.ts +37 -2
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@edraj/sauron-node` are documented here.
|
|
4
4
|
|
|
5
|
+
## 1.6.0
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- **`release` is required at init.** `init()`/`new SauronClient()` throws
|
|
10
|
+
`[sauron] init requires a release option` when `release` is missing, not a
|
|
11
|
+
string, or whitespace-only. `release` is trimmed before it is sent.
|
|
12
|
+
`InitOptions.release` is now a required `string` (was optional/nullable).
|
|
13
|
+
- **`dsn` empty-string check.** `init()` now also throws when `dsn` is an
|
|
14
|
+
empty string, not just when it is missing or non-string.
|
|
15
|
+
|
|
16
|
+
## 1.5.0
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **`tags` and `extra` on transactions.** `trackTransaction` now accepts two
|
|
21
|
+
developer-supplied maps: `tags` (flat string→string, indexed) and `extra`
|
|
22
|
+
(freeform JSON). `extra` is where a request body, a response body, an order
|
|
23
|
+
id or a retry count goes — the span that times an HTTP call can now carry
|
|
24
|
+
what the call actually sent and received.
|
|
25
|
+
|
|
26
|
+
Both are visible on the new **Transactions** page and in the session
|
|
27
|
+
timeline, and both are searchable: `@tag.tier:premium`,
|
|
28
|
+
`extra.order_id:9001`, or `extra.response:~9001` to match a substring
|
|
29
|
+
*inside* a stored response body.
|
|
30
|
+
|
|
31
|
+
**They are per-call only.** Unlike `captureException` and `track`, a
|
|
32
|
+
transaction does not inherit the scope — `setTag()` / `setExtra()` defaults
|
|
33
|
+
are not merged in. Transactions are the highest-volume signal an app emits,
|
|
34
|
+
one per navigation and per request, so inheriting a global blob would write
|
|
35
|
+
it onto every row. This asymmetry is deliberate and is documented on the
|
|
36
|
+
method.
|
|
37
|
+
|
|
38
|
+
`extra` is serialized and capped at **16 KB**. Past that the whole map is
|
|
39
|
+
replaced with a `{"_truncated": true, "_bytes": N}` marker, and the
|
|
40
|
+
dashboard says so on the row rather than showing a short object that looks
|
|
41
|
+
complete. The cap is not cosmetic: envelopes are batched, and one oversized
|
|
42
|
+
body would push the whole envelope past the ingest limit and take every
|
|
43
|
+
unrelated span sent with it — a silent loss of data nobody asked about.
|
|
44
|
+
Size is measured in UTF-8 bytes, so non-ASCII payloads are counted at what
|
|
45
|
+
they actually cost on the wire.
|
|
46
|
+
|
|
47
|
+
Nothing in `extra` is scrubbed. `beforeSend` remains the redaction seam;
|
|
48
|
+
think twice before attaching a body that can carry tokens or personal data.
|
|
49
|
+
|
|
50
|
+
An app that sets neither field serializes byte-identically to before: both
|
|
51
|
+
keys are omitted when empty, never sent as `null`.
|
|
52
|
+
|
|
53
|
+
Signature: `trackTransaction({ …, tags?: Record<string, string>, extra?: Record<string, unknown> })`. `MAX_TRANSACTION_EXTRA_BYTES` and `capTransactionExtra` are now exported from the package entrypoint, so a caller can size a payload before attaching it.
|
|
54
|
+
|
|
5
55
|
## 1.4.0
|
|
6
56
|
|
|
7
57
|
### Fixed
|