@sentry/node 8.21.0 → 8.23.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 (48) hide show
  1. package/build/cjs/index.js +2 -1
  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/local-variables-async.js +1 -1
  5. package/build/cjs/integrations/tracing/index.js +1 -1
  6. package/build/cjs/integrations/tracing/index.js.map +1 -1
  7. package/build/cjs/integrations/tracing/nest/helpers.js +39 -0
  8. package/build/cjs/integrations/tracing/nest/helpers.js.map +1 -0
  9. package/build/cjs/integrations/tracing/nest/nest.js +123 -0
  10. package/build/cjs/integrations/tracing/nest/nest.js.map +1 -0
  11. package/build/cjs/integrations/tracing/nest/sentry-nest-instrumentation.js +178 -0
  12. package/build/cjs/integrations/tracing/nest/sentry-nest-instrumentation.js.map +1 -0
  13. package/build/esm/index.js +2 -2
  14. package/build/esm/integrations/anr/index.js +1 -1
  15. package/build/esm/integrations/anr/worker-script.js +2 -2
  16. package/build/esm/integrations/local-variables/local-variables-async.js +1 -1
  17. package/build/esm/integrations/local-variables/worker-script.js +1 -1
  18. package/build/esm/integrations/tracing/index.js +1 -1
  19. package/build/esm/integrations/tracing/index.js.map +1 -1
  20. package/build/esm/integrations/tracing/nest/helpers.js +36 -0
  21. package/build/esm/integrations/tracing/nest/helpers.js.map +1 -0
  22. package/build/esm/integrations/tracing/nest/nest.js +116 -0
  23. package/build/esm/integrations/tracing/nest/nest.js.map +1 -0
  24. package/build/esm/integrations/tracing/nest/sentry-nest-instrumentation.js +176 -0
  25. package/build/esm/integrations/tracing/nest/sentry-nest-instrumentation.js.map +1 -0
  26. package/build/types/index.d.ts +2 -2
  27. package/build/types/index.d.ts.map +1 -1
  28. package/build/types/integrations/tracing/nest/helpers.d.ts +19 -0
  29. package/build/types/integrations/tracing/nest/helpers.d.ts.map +1 -0
  30. package/build/types/integrations/tracing/nest/nest.d.ts +15 -0
  31. package/build/types/integrations/tracing/nest/nest.d.ts.map +1 -0
  32. package/build/types/integrations/tracing/nest/sentry-nest-instrumentation.d.ts +29 -0
  33. package/build/types/integrations/tracing/nest/sentry-nest-instrumentation.d.ts.map +1 -0
  34. package/build/types/integrations/tracing/nest/types.d.ts +50 -0
  35. package/build/types/integrations/tracing/nest/types.d.ts.map +1 -0
  36. package/build/types-ts3.8/index.d.ts +2 -2
  37. package/build/types-ts3.8/integrations/tracing/nest/helpers.d.ts +19 -0
  38. package/build/types-ts3.8/integrations/tracing/nest/nest.d.ts +15 -0
  39. package/build/types-ts3.8/integrations/tracing/nest/sentry-nest-instrumentation.d.ts +29 -0
  40. package/build/types-ts3.8/integrations/tracing/nest/types.d.ts +50 -0
  41. package/package.json +5 -5
  42. package/build/cjs/integrations/tracing/nest.js +0 -253
  43. package/build/cjs/integrations/tracing/nest.js.map +0 -1
  44. package/build/esm/integrations/tracing/nest.js +0 -244
  45. package/build/esm/integrations/tracing/nest.js.map +0 -1
  46. package/build/types/integrations/tracing/nest.d.ts +0 -82
  47. package/build/types/integrations/tracing/nest.d.ts.map +0 -1
  48. package/build/types-ts3.8/integrations/tracing/nest.d.ts +0 -82
@@ -1,82 +0,0 @@
1
- import type { InstrumentationConfig } from '@opentelemetry/instrumentation';
2
- import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
3
- interface MinimalNestJsExecutionContext {
4
- getType: () => string;
5
- switchToHttp: () => {
6
- getRequest: () => {
7
- route?: {
8
- path?: string;
9
- };
10
- method?: string;
11
- };
12
- };
13
- }
14
- interface NestJsErrorFilter {
15
- catch(exception: any, host: any): void;
16
- }
17
- interface MinimalNestJsApp {
18
- useGlobalFilters: (arg0: NestJsErrorFilter) => void;
19
- useGlobalInterceptors: (interceptor: {
20
- intercept: (context: MinimalNestJsExecutionContext, next: {
21
- handle: () => any;
22
- }) => any;
23
- }) => void;
24
- }
25
- /**
26
- * Represents an injectable target class in NestJS.
27
- */
28
- export interface InjectableTarget {
29
- name: string;
30
- sentryPatched?: boolean;
31
- prototype: {
32
- use?: (req: unknown, res: unknown, next: () => void) => void;
33
- };
34
- }
35
- /**
36
- * Helper checking if a concrete target class is already patched.
37
- *
38
- * We already guard duplicate patching with isWrapped. However, isWrapped checks whether a file has been patched, whereas we use this check for concrete target classes.
39
- * This check might not be necessary, but better to play it safe.
40
- */
41
- export declare function isPatched(target: InjectableTarget): boolean;
42
- /**
43
- * Custom instrumentation for nestjs.
44
- *
45
- * This hooks into the @Injectable decorator, which is applied on class middleware, interceptors and guards.
46
- */
47
- export declare class SentryNestInstrumentation extends InstrumentationBase {
48
- static readonly COMPONENT = "@nestjs/common";
49
- static readonly COMMON_ATTRIBUTES: {
50
- component: string;
51
- };
52
- constructor(config?: InstrumentationConfig);
53
- /**
54
- * Initializes the instrumentation by defining the modules to be patched.
55
- */
56
- init(): InstrumentationNodeModuleDefinition;
57
- /**
58
- * Wraps the @Injectable decorator.
59
- */
60
- private _getInjectableFileInstrumentation;
61
- /**
62
- * Creates a wrapper function for the @Injectable decorator.
63
- *
64
- * Wraps the use method to instrument nest class middleware.
65
- */
66
- private _createWrapInjectable;
67
- }
68
- export declare const instrumentNest: (() => void) & {
69
- id: string;
70
- };
71
- /**
72
- * Nest framework integration
73
- *
74
- * Capture tracing data for nest.
75
- */
76
- export declare const nestIntegration: () => import("@sentry/types").Integration;
77
- /**
78
- * Setup an error handler for Nest.
79
- */
80
- export declare function setupNestErrorHandler(app: MinimalNestJsApp, baseFilter: NestJsErrorFilter): void;
81
- export {};
82
- //# sourceMappingURL=nest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nest.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/nest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EACL,mBAAmB,EACnB,mCAAmC,EAEpC,MAAM,gCAAgC,CAAC;AAoB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AUD,eAAO,MAAM,cAAc,SACrB,IAAI;;CAKT,CAAC;AAWF;;;;GAIG;AACH,eAAO,MAAM,eAAe,2CAAsC,CAAC;AAEnE;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,EAAE,UAAU,EAAE,iBAAiB,GAAG,IAAI,CAmDhG"}
@@ -1,82 +0,0 @@
1
- import { InstrumentationConfig } from '@opentelemetry/instrumentation';
2
- import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
3
- interface MinimalNestJsExecutionContext {
4
- getType: () => string;
5
- switchToHttp: () => {
6
- getRequest: () => {
7
- route?: {
8
- path?: string;
9
- };
10
- method?: string;
11
- };
12
- };
13
- }
14
- interface NestJsErrorFilter {
15
- catch(exception: any, host: any): void;
16
- }
17
- interface MinimalNestJsApp {
18
- useGlobalFilters: (arg0: NestJsErrorFilter) => void;
19
- useGlobalInterceptors: (interceptor: {
20
- intercept: (context: MinimalNestJsExecutionContext, next: {
21
- handle: () => any;
22
- }) => any;
23
- }) => void;
24
- }
25
- /**
26
- * Represents an injectable target class in NestJS.
27
- */
28
- export interface InjectableTarget {
29
- name: string;
30
- sentryPatched?: boolean;
31
- prototype: {
32
- use?: (req: unknown, res: unknown, next: () => void) => void;
33
- };
34
- }
35
- /**
36
- * Helper checking if a concrete target class is already patched.
37
- *
38
- * We already guard duplicate patching with isWrapped. However, isWrapped checks whether a file has been patched, whereas we use this check for concrete target classes.
39
- * This check might not be necessary, but better to play it safe.
40
- */
41
- export declare function isPatched(target: InjectableTarget): boolean;
42
- /**
43
- * Custom instrumentation for nestjs.
44
- *
45
- * This hooks into the @Injectable decorator, which is applied on class middleware, interceptors and guards.
46
- */
47
- export declare class SentryNestInstrumentation extends InstrumentationBase {
48
- static readonly COMPONENT = "@nestjs/common";
49
- static readonly COMMON_ATTRIBUTES: {
50
- component: string;
51
- };
52
- constructor(config?: InstrumentationConfig);
53
- /**
54
- * Initializes the instrumentation by defining the modules to be patched.
55
- */
56
- init(): InstrumentationNodeModuleDefinition;
57
- /**
58
- * Wraps the @Injectable decorator.
59
- */
60
- private _getInjectableFileInstrumentation;
61
- /**
62
- * Creates a wrapper function for the @Injectable decorator.
63
- *
64
- * Wraps the use method to instrument nest class middleware.
65
- */
66
- private _createWrapInjectable;
67
- }
68
- export declare const instrumentNest: (() => void) & {
69
- id: string;
70
- };
71
- /**
72
- * Nest framework integration
73
- *
74
- * Capture tracing data for nest.
75
- */
76
- export declare const nestIntegration: () => import("@sentry/types").Integration;
77
- /**
78
- * Setup an error handler for Nest.
79
- */
80
- export declare function setupNestErrorHandler(app: MinimalNestJsApp, baseFilter: NestJsErrorFilter): void;
81
- export {};
82
- //# sourceMappingURL=nest.d.ts.map