@edraj/sauron-node 1.0.0 → 1.4.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 +57 -0
- package/README.md +1148 -88
- package/dist/client.d.ts +113 -4
- package/dist/client.js +261 -9
- package/dist/index.d.ts +23 -1
- package/dist/index.js +24 -0
- package/dist/scope.js +5 -0
- package/dist/transport.d.ts +2 -1
- package/dist/transport.js +5 -2
- package/dist/types.d.ts +52 -4
- package/dist/workflow.d.ts +26 -0
- package/dist/workflow.js +51 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,63 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@edraj/sauron-node` are documented here.
|
|
4
4
|
|
|
5
|
+
## 1.4.0
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **`trackTransaction` shipped transactions with no duration, silently.** This
|
|
10
|
+
SDK's input field is `duration_ms`; the browser SDK's is `durationMs`. A
|
|
11
|
+
snippet moved between the two — or any plain-JavaScript caller, where the type
|
|
12
|
+
checker is not there to object — produced a transaction item missing the one
|
|
13
|
+
field it exists to carry, and nothing anywhere complained: the item validated,
|
|
14
|
+
shipped, and looked delivered.
|
|
15
|
+
|
|
16
|
+
`durationMs` is now accepted as an alias, and a transaction with no usable
|
|
17
|
+
duration is **dropped with a debug log line rather than sent**. Refusing is the
|
|
18
|
+
point: sending it anyway is what let the misspelling survive unnoticed.
|
|
19
|
+
`duration_ms: 0` is a legitimate duration and is still sent.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- `TransactionInput.duration_ms` is now optional, since `durationMs` may supply
|
|
24
|
+
it instead. Supply exactly one — `duration_ms` wins if both are present.
|
|
25
|
+
Supplying neither is the drop above, not a compile error.
|
|
26
|
+
|
|
27
|
+
## 1.3.0
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- **Workflows** — bound a named span of activity with `startWorkflow(name,
|
|
32
|
+
{ force? })` / `endWorkflow(name?)` / `cancelWorkflow(name?, { reason? })`,
|
|
33
|
+
and read the active one with `getWorkflow()`. Every event, error and
|
|
34
|
+
transaction captured while a workflow is active is stamped with its
|
|
35
|
+
`workflow_id` / `workflow_name`, so the dashboard can group a whole flow
|
|
36
|
+
(`checkout`, `password_reset`, …) as one unit. The three lifecycle events
|
|
37
|
+
`$workflow_start` / `$workflow_end` / `$workflow_cancel` are emitted
|
|
38
|
+
automatically, carrying `duration_ms` (and `reason` on cancel).
|
|
39
|
+
- New exported types: `WorkflowStatus`, `WorkflowResult`, `ActiveWorkflow`.
|
|
40
|
+
- `SauronClient.isEnabled()` — `false` once the transport has auto-disabled
|
|
41
|
+
itself on a 401/403.
|
|
42
|
+
|
|
43
|
+
Workflows are entirely **optional**: an app that never calls them emits
|
|
44
|
+
byte-identical telemetry to 1.2.0 — the two fields are omitted from the wire
|
|
45
|
+
JSON, never sent as `null`.
|
|
46
|
+
|
|
47
|
+
The active workflow is **request-scoped**, held on the current `Scope` and
|
|
48
|
+
isolated by the same `AsyncLocalStorage` that already isolates
|
|
49
|
+
`user`/`tags`/`breadcrumbs`. Concurrent requests never observe or clobber each
|
|
50
|
+
other's workflow. None of the three methods ever throws — each returns one of
|
|
51
|
+
six statuses (`ok`, `already_active`, `not_active`, `name_mismatch`,
|
|
52
|
+
`invalid_name`, `disabled`).
|
|
53
|
+
|
|
54
|
+
## 1.2.0
|
|
55
|
+
|
|
56
|
+
- **Breaking: the `environment` option has been removed.** An environment is now
|
|
57
|
+
identified by the ingest key it belongs to, not by a string the client sends.
|
|
58
|
+
Create environments in the dashboard under app settings; each one has its own
|
|
59
|
+
DSN. Delete `environment` from your `init` call and swap in the DSN of the
|
|
60
|
+
environment you want to report to.
|
|
61
|
+
|
|
5
62
|
## 1.0.0 - 2026-07-27
|
|
6
63
|
|
|
7
64
|
First public release. Prior `0.x` versions were internal-only and were never
|