@sentry/node-native 9.38.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.
Files changed (32) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +68 -0
  3. package/build/cjs/common.js +6 -0
  4. package/build/cjs/common.js.map +1 -0
  5. package/build/cjs/event-loop-block-integration.js +170 -0
  6. package/build/cjs/event-loop-block-integration.js.map +1 -0
  7. package/build/cjs/event-loop-block-watchdog.js +275 -0
  8. package/build/cjs/event-loop-block-watchdog.js.map +1 -0
  9. package/build/cjs/index.js +8 -0
  10. package/build/cjs/index.js.map +1 -0
  11. package/build/esm/common.js +4 -0
  12. package/build/esm/common.js.map +1 -0
  13. package/build/esm/event-loop-block-integration.js +167 -0
  14. package/build/esm/event-loop-block-integration.js.map +1 -0
  15. package/build/esm/event-loop-block-watchdog.js +275 -0
  16. package/build/esm/event-loop-block-watchdog.js.map +1 -0
  17. package/build/esm/index.js +2 -0
  18. package/build/esm/index.js.map +1 -0
  19. package/build/esm/package.json +1 -0
  20. package/build/types/common.d.ts +43 -0
  21. package/build/types/common.d.ts.map +1 -0
  22. package/build/types/event-loop-block-integration.d.ts +32 -0
  23. package/build/types/event-loop-block-integration.d.ts.map +1 -0
  24. package/build/types/event-loop-block-watchdog.d.ts +2 -0
  25. package/build/types/event-loop-block-watchdog.d.ts.map +1 -0
  26. package/build/types/index.d.ts +2 -0
  27. package/build/types/index.d.ts.map +1 -0
  28. package/build/types-ts3.8/common.d.ts +43 -0
  29. package/build/types-ts3.8/event-loop-block-integration.d.ts +32 -0
  30. package/build/types-ts3.8/event-loop-block-watchdog.d.ts +2 -0
  31. package/build/types-ts3.8/index.d.ts +2 -0
  32. package/package.json +87 -0
@@ -0,0 +1,32 @@
1
+ import { ThreadBlockedIntegrationOptions } from './common';
2
+ /**
3
+ * Monitors the Node.js event loop for blocking behavior and reports blocked events to Sentry.
4
+ *
5
+ * Uses a background worker thread to detect when the main thread is blocked for longer than
6
+ * the configured threshold (default: 1 second).
7
+ *
8
+ * When instrumenting via the `--import` flag, this integration will
9
+ * automatically monitor all worker threads as well.
10
+ *
11
+ * ```js
12
+ * // instrument.mjs
13
+ * import * as Sentry from '@sentry/node';
14
+ * import { eventLoopBlockIntegration } from '@sentry/node-native';
15
+ *
16
+ * Sentry.init({
17
+ * dsn: '__YOUR_DSN__',
18
+ * integrations: [
19
+ * eventLoopBlockIntegration({
20
+ * threshold: 500, // Report blocks longer than 500ms
21
+ * }),
22
+ * ],
23
+ * });
24
+ * ```
25
+ *
26
+ * Start your application with:
27
+ * ```bash
28
+ * node --import instrument.mjs app.mjs
29
+ * ```
30
+ */
31
+ export declare const eventLoopBlockIntegration: (options?: Partial<ThreadBlockedIntegrationOptions> | undefined) => import("@sentry/core").Integration;
32
+ //# sourceMappingURL=event-loop-block-integration.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=event-loop-block-watchdog.d.ts.map
@@ -0,0 +1,2 @@
1
+ export { eventLoopBlockIntegration } from './event-loop-block-integration';
2
+ //# sourceMappingURL=index.d.ts.map
package/package.json ADDED
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "@sentry/node-native",
3
+ "version": "9.38.0",
4
+ "description": "Native Tools for the Official Sentry Node.js SDK",
5
+ "repository": "git://github.com/getsentry/sentry-javascript.git",
6
+ "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/node-native",
7
+ "author": "Sentry",
8
+ "license": "MIT",
9
+ "main": "build/cjs/index.js",
10
+ "module": "build/esm/index.js",
11
+ "types": "build/types/index.d.ts",
12
+ "exports": {
13
+ "./package.json": "./package.json",
14
+ ".": {
15
+ "import": {
16
+ "types": "./build/types/index.d.ts",
17
+ "default": "./build/esm/index.js"
18
+ },
19
+ "require": {
20
+ "types": "./build/types/index.d.ts",
21
+ "default": "./build/cjs/index.js"
22
+ }
23
+ },
24
+ "./event-loop-block-watchdog": {
25
+ "import": {
26
+ "default": "./build/esm/event-loop-block-watchdog.js"
27
+ },
28
+ "require": {
29
+ "default": "./build/cjs/event-loop-block-watchdog.js"
30
+ }
31
+ }
32
+ },
33
+ "typesVersions": {
34
+ "<5.0": {
35
+ "build/types/index.d.ts": [
36
+ "build/types-ts3.8/index.d.ts"
37
+ ]
38
+ }
39
+ },
40
+ "engines": {
41
+ "node": ">=18"
42
+ },
43
+ "publishConfig": {
44
+ "access": "public"
45
+ },
46
+ "files": [
47
+ "/build",
48
+ "package.json"
49
+ ],
50
+ "scripts": {
51
+ "clean": "rm -rf build",
52
+ "lint": "eslint . --format stylish",
53
+ "lint:es-compatibility": "es-check es2022 ./build/cjs/*.js && es-check es2022 ./build/esm/*.js --module",
54
+ "fix": "eslint . --format stylish --fix",
55
+ "build": "yarn build:types && yarn build:transpile",
56
+ "build:transpile": "yarn rollup -c rollup.npm.config.mjs",
57
+ "build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8",
58
+ "build:types": "tsc -p tsconfig.types.json && yarn build:types:downlevel",
59
+ "build:types:watch": "tsc -p tsconfig.types.json --watch",
60
+ "build:dev": "yarn clean && yarn build",
61
+ "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
62
+ "build:watch": "run-p build:transpile:watch build:types:watch",
63
+ "build:tarball": "npm pack"
64
+ },
65
+ "dependencies": {
66
+ "@sentry-internal/node-native-stacktrace": "^0.1.0",
67
+ "@sentry/core": "9.38.0",
68
+ "@sentry/node": "9.38.0"
69
+ },
70
+ "devDependencies": {
71
+ "@types/node": "^18.19.1"
72
+ },
73
+ "volta": {
74
+ "extends": "../../package.json"
75
+ },
76
+ "sideEffects": false,
77
+ "nx": {
78
+ "targets": {
79
+ "build:transpile": {
80
+ "dependsOn": [
81
+ "^build:transpile",
82
+ "^build:types"
83
+ ]
84
+ }
85
+ }
86
+ }
87
+ }