@edraj/sauron-node 1.0.0 → 1.3.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 +35 -0
- package/README.md +1148 -88
- package/dist/client.d.ts +113 -4
- package/dist/client.js +247 -8
- 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 +38 -3
- 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,41 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@edraj/sauron-node` are documented here.
|
|
4
4
|
|
|
5
|
+
## 1.3.0
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **Workflows** — bound a named span of activity with `startWorkflow(name,
|
|
10
|
+
{ force? })` / `endWorkflow(name?)` / `cancelWorkflow(name?, { reason? })`,
|
|
11
|
+
and read the active one with `getWorkflow()`. Every event, error and
|
|
12
|
+
transaction captured while a workflow is active is stamped with its
|
|
13
|
+
`workflow_id` / `workflow_name`, so the dashboard can group a whole flow
|
|
14
|
+
(`checkout`, `password_reset`, …) as one unit. The three lifecycle events
|
|
15
|
+
`$workflow_start` / `$workflow_end` / `$workflow_cancel` are emitted
|
|
16
|
+
automatically, carrying `duration_ms` (and `reason` on cancel).
|
|
17
|
+
- New exported types: `WorkflowStatus`, `WorkflowResult`, `ActiveWorkflow`.
|
|
18
|
+
- `SauronClient.isEnabled()` — `false` once the transport has auto-disabled
|
|
19
|
+
itself on a 401/403.
|
|
20
|
+
|
|
21
|
+
Workflows are entirely **optional**: an app that never calls them emits
|
|
22
|
+
byte-identical telemetry to 1.2.0 — the two fields are omitted from the wire
|
|
23
|
+
JSON, never sent as `null`.
|
|
24
|
+
|
|
25
|
+
The active workflow is **request-scoped**, held on the current `Scope` and
|
|
26
|
+
isolated by the same `AsyncLocalStorage` that already isolates
|
|
27
|
+
`user`/`tags`/`breadcrumbs`. Concurrent requests never observe or clobber each
|
|
28
|
+
other's workflow. None of the three methods ever throws — each returns one of
|
|
29
|
+
six statuses (`ok`, `already_active`, `not_active`, `name_mismatch`,
|
|
30
|
+
`invalid_name`, `disabled`).
|
|
31
|
+
|
|
32
|
+
## 1.2.0
|
|
33
|
+
|
|
34
|
+
- **Breaking: the `environment` option has been removed.** An environment is now
|
|
35
|
+
identified by the ingest key it belongs to, not by a string the client sends.
|
|
36
|
+
Create environments in the dashboard under app settings; each one has its own
|
|
37
|
+
DSN. Delete `environment` from your `init` call and swap in the DSN of the
|
|
38
|
+
environment you want to report to.
|
|
39
|
+
|
|
5
40
|
## 1.0.0 - 2026-07-27
|
|
6
41
|
|
|
7
42
|
First public release. Prior `0.x` versions were internal-only and were never
|