@hellsoft/vaka-node 0.0.0-stage → 0.2.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/README.md +24 -2
- package/dist/index.cjs +939 -0
- package/dist/index.d.ts +147 -0
- package/dist/index.mjs +874 -0
- package/dist/integrations.d.ts +45 -0
- package/dist/otel.d.ts +38 -0
- package/dist/register.cjs +41 -0
- package/dist/register.d.ts +1 -0
- package/dist/register.mjs +16 -0
- package/dist/scope.d.ts +44 -0
- package/dist/stack.d.ts +16 -0
- package/dist/transport.d.ts +33 -0
- package/package.json +66 -4
package/README.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @hellsoft/vaka-node
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Node.js SDK for [Vaka](https://github.com/ErikHellman/vaka): crash and error reporting,
|
|
4
|
+
OpenTelemetry traces and logs, breadcrumbs, release tagging and feature flags.
|
|
5
|
+
|
|
6
|
+
```sh
|
|
7
|
+
npm install @hellsoft/vaka-node
|
|
8
|
+
VAKA_KEY=vk_... VAKA_ENDPOINT=https://vaka.example.com VAKA_RELEASE=1.0.0 \
|
|
9
|
+
node --import @hellsoft/vaka-node/register server.js
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import * as Vaka from '@hellsoft/vaka-node';
|
|
14
|
+
|
|
15
|
+
app.use(Vaka.requestHandler()); // Express: per-request scope
|
|
16
|
+
// routes
|
|
17
|
+
app.use(Vaka.errorHandler()); // report 5xx errors
|
|
18
|
+
|
|
19
|
+
Vaka.setUser(req.user.id);
|
|
20
|
+
if (await Vaka.isEnabled('new_checkout')) { /* ... */ }
|
|
21
|
+
Vaka.captureException(err);
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Docs: [SDK reference](https://vaka.hellsoft.se/sdk-node.html) ·
|
|
25
|
+
[install guide](https://vaka.hellsoft.se/install/node.html). License: MIT OR Apache-2.0.
|