@sentry/node 8.29.0 → 8.30.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 (57) hide show
  1. package/build/cjs/index.js +2 -0
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/integrations/anr/index.js +1 -1
  4. package/build/cjs/integrations/local-variables/common.js +6 -24
  5. package/build/cjs/integrations/local-variables/common.js.map +1 -1
  6. package/build/cjs/integrations/local-variables/local-variables-async.js +24 -35
  7. package/build/cjs/integrations/local-variables/local-variables-async.js.map +1 -1
  8. package/build/cjs/integrations/local-variables/local-variables-sync.js +26 -2
  9. package/build/cjs/integrations/local-variables/local-variables-sync.js.map +1 -1
  10. package/build/cjs/integrations/node-fetch.js +20 -95
  11. package/build/cjs/integrations/node-fetch.js.map +1 -1
  12. package/build/cjs/integrations/tracing/index.js +3 -0
  13. package/build/cjs/integrations/tracing/index.js.map +1 -1
  14. package/build/cjs/integrations/tracing/kafka.js +41 -0
  15. package/build/cjs/integrations/tracing/kafka.js.map +1 -0
  16. package/build/cjs/integrations/tracing/koa.js +1 -1
  17. package/build/cjs/integrations/tracing/koa.js.map +1 -1
  18. package/build/cjs/sdk/initOtel.js +3 -2
  19. package/build/cjs/sdk/initOtel.js.map +1 -1
  20. package/build/esm/index.js +1 -0
  21. package/build/esm/index.js.map +1 -1
  22. package/build/esm/integrations/anr/index.js +1 -1
  23. package/build/esm/integrations/anr/worker-script.js +2 -2
  24. package/build/esm/integrations/local-variables/common.js +6 -23
  25. package/build/esm/integrations/local-variables/common.js.map +1 -1
  26. package/build/esm/integrations/local-variables/local-variables-async.js +26 -37
  27. package/build/esm/integrations/local-variables/local-variables-async.js.map +1 -1
  28. package/build/esm/integrations/local-variables/local-variables-sync.js +24 -2
  29. package/build/esm/integrations/local-variables/local-variables-sync.js.map +1 -1
  30. package/build/esm/integrations/local-variables/worker-script.js +2 -2
  31. package/build/esm/integrations/node-fetch.js +23 -95
  32. package/build/esm/integrations/node-fetch.js.map +1 -1
  33. package/build/esm/integrations/tracing/index.js +3 -0
  34. package/build/esm/integrations/tracing/index.js.map +1 -1
  35. package/build/esm/integrations/tracing/kafka.js +38 -0
  36. package/build/esm/integrations/tracing/kafka.js.map +1 -0
  37. package/build/esm/integrations/tracing/koa.js +2 -2
  38. package/build/esm/integrations/tracing/koa.js.map +1 -1
  39. package/build/esm/sdk/initOtel.js +4 -3
  40. package/build/esm/sdk/initOtel.js.map +1 -1
  41. package/build/types/index.d.ts +1 -0
  42. package/build/types/index.d.ts.map +1 -1
  43. package/build/types/integrations/local-variables/common.d.ts +5 -8
  44. package/build/types/integrations/local-variables/common.d.ts.map +1 -1
  45. package/build/types/integrations/local-variables/local-variables-async.d.ts.map +1 -1
  46. package/build/types/integrations/local-variables/local-variables-sync.d.ts +8 -0
  47. package/build/types/integrations/local-variables/local-variables-sync.d.ts.map +1 -1
  48. package/build/types/integrations/node-fetch.d.ts.map +1 -1
  49. package/build/types/integrations/tracing/index.d.ts.map +1 -1
  50. package/build/types/integrations/tracing/kafka.d.ts +10 -0
  51. package/build/types/integrations/tracing/kafka.d.ts.map +1 -0
  52. package/build/types/sdk/initOtel.d.ts.map +1 -1
  53. package/build/types-ts3.8/index.d.ts +1 -0
  54. package/build/types-ts3.8/integrations/local-variables/common.d.ts +5 -8
  55. package/build/types-ts3.8/integrations/local-variables/local-variables-sync.d.ts +8 -0
  56. package/build/types-ts3.8/integrations/tracing/kafka.d.ts +10 -0
  57. package/package.json +10 -11
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAkBjD;;GAEG;AACH,wBAAgB,8BAA8B,IAAI,WAAW,EAAE,CAqB9D;AAED;;GAEG;AAEH,wBAAgB,wCAAwC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,CAmBzG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAmBjD;;GAEG;AACH,wBAAgB,8BAA8B,IAAI,WAAW,EAAE,CAsB9D;AAED;;GAEG;AAEH,wBAAgB,wCAAwC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,CAoBzG"}
@@ -0,0 +1,10 @@
1
+ export declare const instrumentKafka: ((options?: unknown) => void) & {
2
+ id: string;
3
+ };
4
+ /**
5
+ * KafkaJs integration
6
+ *
7
+ * Capture tracing data for KafkaJs.
8
+ */
9
+ export declare const kafkaIntegration: () => import("@sentry/types").Integration;
10
+ //# sourceMappingURL=kafka.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kafka.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/kafka.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,eAAe;;CAW3B,CAAC;AAWF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,2CAAuC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"initOtel.d.ts","sourceRoot":"","sources":["../../../src/sdk/initOtel.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAapE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAErD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAI3C;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAO1D;AAsBD,iCAAiC;AACjC,wBAAgB,wBAAwB,CAAC,aAAa,CAAC,EAAE,oBAAoB,GAAG,IAAI,CA0BnF;AAED,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,sBAAsB,CAAC,EAAE,oBAAoB,CAAC;CAC/C;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,kBAAuB,GAAG,IAAI,CAoB3E;AAYD,+BAA+B;AAC/B,wBAAgB,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,mBAAmB,CAwBjE"}
1
+ {"version":3,"file":"initOtel.d.ts","sourceRoot":"","sources":["../../../src/sdk/initOtel.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAapE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAErD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAI3C;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAO1D;AAsBD,iCAAiC;AACjC,wBAAgB,wBAAwB,CAAC,aAAa,CAAC,EAAE,oBAAoB,GAAG,IAAI,CA0BnF;AAED,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,sBAAsB,CAAC,EAAE,oBAAoB,CAAC;CAC/C;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,kBAAuB,GAAG,IAAI,CAoB3E;AAYD,+BAA+B;AAC/B,wBAAgB,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,mBAAmB,CAyBjE"}
@@ -12,6 +12,7 @@ export { anrIntegration } from './integrations/anr';
12
12
  export { expressIntegration, expressErrorHandler, setupExpressErrorHandler } from './integrations/tracing/express';
13
13
  export { fastifyIntegration, setupFastifyErrorHandler } from './integrations/tracing/fastify';
14
14
  export { graphqlIntegration } from './integrations/tracing/graphql';
15
+ export { kafkaIntegration } from './integrations/tracing/kafka';
15
16
  export { mongoIntegration } from './integrations/tracing/mongo';
16
17
  export { mongooseIntegration } from './integrations/tracing/mongoose';
17
18
  export { mysqlIntegration } from './integrations/tracing/mysql';
@@ -1,8 +1,11 @@
1
1
  /// <reference types="node" />
2
2
  import { Debugger } from 'node:inspector';
3
- import { StackFrame, StackParser } from '@sentry/types';
4
3
  export type Variables = Record<string, unknown>;
5
4
  export type RateLimitIncrement = () => void;
5
+ /**
6
+ * The key used to store the local variables on the error object.
7
+ */
8
+ export declare const LOCAL_VARIABLES_KEY = "__SENTRY_ERROR_LOCAL_VARIABLES__";
6
9
  /**
7
10
  * Creates a rate limiter that will call the disable callback when the rate limit is reached and the enable callback
8
11
  * when a timeout has occurred.
@@ -15,19 +18,13 @@ export declare function createRateLimiter(maxPerSecond: number, enable: () => vo
15
18
  export type PausedExceptionEvent = Debugger.PausedEventDataType & {
16
19
  data: {
17
20
  description: string;
21
+ objectId?: string;
18
22
  };
19
23
  };
20
24
  /** Could this be an anonymous function? */
21
25
  export declare function isAnonymous(name: string | undefined): boolean;
22
26
  /** Do the function names appear to match? */
23
27
  export declare function functionNamesMatch(a: string | undefined, b: string | undefined): boolean;
24
- /** Creates a unique hash from stack frames */
25
- export declare function hashFrames(frames: StackFrame[] | undefined): string | undefined;
26
- /**
27
- * We use the stack parser to create a unique hash from the exception stack trace
28
- * This is used to lookup vars when the exception passes through the event processor
29
- */
30
- export declare function hashFromStack(stackParser: StackParser, stack: string | undefined): string | undefined;
31
28
  export interface FrameVariables {
32
29
  function: string;
33
30
  vars?: Variables;
@@ -1,6 +1,14 @@
1
1
  /// <reference types="node" />
2
2
  import { Debugger, InspectorNotification } from 'node:inspector';
3
+ import { StackFrame, StackParser } from '@sentry/types';
3
4
  import { LocalVariablesIntegrationOptions, Variables } from './common';
5
+ /** Creates a unique hash from stack frames */
6
+ export declare function hashFrames(frames: StackFrame[] | undefined): string | undefined;
7
+ /**
8
+ * We use the stack parser to create a unique hash from the exception stack trace
9
+ * This is used to lookup vars when the exception passes through the event processor
10
+ */
11
+ export declare function hashFromStack(stackParser: StackParser, stack: string | undefined): string | undefined;
4
12
  type OnPauseEvent = InspectorNotification<Debugger.PausedEventDataType>;
5
13
  export interface DebugSession {
6
14
  /** Configures and connects to the debug session */
@@ -0,0 +1,10 @@
1
+ export declare const instrumentKafka: ((options?: unknown) => void) & {
2
+ id: string;
3
+ };
4
+ /**
5
+ * KafkaJs integration
6
+ *
7
+ * Capture tracing data for KafkaJs.
8
+ */
9
+ export declare const kafkaIntegration: () => import("@sentry/types").Integration;
10
+ //# sourceMappingURL=kafka.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/node",
3
- "version": "8.29.0",
3
+ "version": "8.30.0",
4
4
  "description": "Sentry Node SDK using OpenTelemetry for performance instrumentation",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/node",
@@ -78,6 +78,7 @@
78
78
  "@opentelemetry/instrumentation-hapi": "0.41.0",
79
79
  "@opentelemetry/instrumentation-http": "0.53.0",
80
80
  "@opentelemetry/instrumentation-ioredis": "0.43.0",
81
+ "@opentelemetry/instrumentation-kafkajs": "0.3.0",
81
82
  "@opentelemetry/instrumentation-koa": "0.43.0",
82
83
  "@opentelemetry/instrumentation-mongodb": "0.47.0",
83
84
  "@opentelemetry/instrumentation-mongoose": "0.42.0",
@@ -86,22 +87,20 @@
86
87
  "@opentelemetry/instrumentation-nestjs-core": "0.40.0",
87
88
  "@opentelemetry/instrumentation-pg": "0.44.0",
88
89
  "@opentelemetry/instrumentation-redis-4": "0.42.0",
89
- "@opentelemetry/resources": "^1.25.1",
90
- "@opentelemetry/sdk-trace-base": "^1.25.1",
91
- "@opentelemetry/semantic-conventions": "^1.25.1",
90
+ "@opentelemetry/instrumentation-undici": "0.6.0",
91
+ "@opentelemetry/resources": "^1.26.0",
92
+ "@opentelemetry/sdk-trace-base": "^1.26.0",
93
+ "@opentelemetry/semantic-conventions": "^1.27.0",
92
94
  "@prisma/instrumentation": "5.19.1",
93
- "@sentry/core": "8.29.0",
94
- "@sentry/opentelemetry": "8.29.0",
95
- "@sentry/types": "8.29.0",
96
- "@sentry/utils": "8.29.0",
95
+ "@sentry/core": "8.30.0",
96
+ "@sentry/opentelemetry": "8.30.0",
97
+ "@sentry/types": "8.30.0",
98
+ "@sentry/utils": "8.30.0",
97
99
  "import-in-the-middle": "^1.11.0"
98
100
  },
99
101
  "devDependencies": {
100
102
  "@types/node": "^14.18.0"
101
103
  },
102
- "optionalDependencies": {
103
- "opentelemetry-instrumentation-fetch-node": "1.2.3"
104
- },
105
104
  "scripts": {
106
105
  "build": "run-p build:transpile build:types",
107
106
  "build:dev": "yarn build",