From c6564319edd7709af2e1f0f3e80815c1bb475e08 Mon Sep 17 00:00:00 2001 From: "hendrik.loewe" Date: Thu, 22 Aug 2024 18:55:23 +0200 Subject: [PATCH] feat: support sentry v8.0 --- dist/graphql.interceptor.d.ts | 2 +- dist/graphql.interceptor.js | 4 +- dist/graphql.interceptor.js.map | 2 +- dist/sentry.interceptor.d.ts | 2 +- dist/sentry.interceptor.js | 4 +- dist/sentry.interceptor.js.map | 2 +- dist/sentry.interfaces.d.ts | 1 + dist/sentry.interfaces.js.map | 2 +- dist/sentry.service.js | 6 +- dist/sentry.service.js.map | 2 +- lib/graphql.interceptor.ts | 5 +- lib/sentry.interceptor.ts | 5 +- lib/sentry.interfaces.ts | 9 + lib/sentry.service.ts | 6 +- package-lock.json | 924 +++++++++++++++++++++++++++++--- package.json | 4 +- 16 files changed, 886 insertions(+), 94 deletions(-) diff --git a/dist/graphql.interceptor.d.ts b/dist/graphql.interceptor.d.ts index 8315947..cd9ad3b 100644 --- a/dist/graphql.interceptor.d.ts +++ b/dist/graphql.interceptor.d.ts @@ -1,6 +1,6 @@ import { ExecutionContext } from "@nestjs/common"; -import { Scope } from '@sentry/hub'; import { SentryInterceptor } from "."; +import { Scope } from "@sentry/node"; export declare class GraphqlInterceptor extends SentryInterceptor { protected captureException(context: ExecutionContext, scope: Scope, exception: any): void; private captureGraphqlException; diff --git a/dist/graphql.interceptor.js b/dist/graphql.interceptor.js index 436e620..f390ea0 100644 --- a/dist/graphql.interceptor.js +++ b/dist/graphql.interceptor.js @@ -8,8 +8,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, Object.defineProperty(exports, "__esModule", { value: true }); exports.GraphqlInterceptor = void 0; const common_1 = require("@nestjs/common"); -const node_1 = require("@sentry/node"); const _1 = require("."); +const node_1 = require("@sentry/node"); let GqlExecutionContext; try { ({ GqlExecutionContext } = require('@nestjs/graphql')); @@ -29,7 +29,7 @@ let GraphqlInterceptor = class GraphqlInterceptor extends _1.SentryInterceptor { const context = gqlContext.getContext(); scope.setExtra('type', info.parentType.name); if (context.req) { - const data = node_1.Handlers.parseRequest({}, context.req, {}); + const data = (0, node_1.extractRequestData)(context.req, {}); scope.setExtra('req', data.request); if (data.extra) scope.setExtras(data.extra); diff --git a/dist/graphql.interceptor.js.map b/dist/graphql.interceptor.js.map index 4efcaad..6561fa9 100644 --- a/dist/graphql.interceptor.js.map +++ b/dist/graphql.interceptor.js.map @@ -1 +1 @@ -{"version":3,"file":"graphql.interceptor.js","sourceRoot":"/","sources":["graphql.interceptor.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA8D;AAK9D,uCAAwC;AACxC,wBAAsC;AAEtC,IAAI,mBAAwB,CAAC;AAC7B,IAAI;IACF,CAAC,EAAE,mBAAmB,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC;CACxD;AAAC,OAAO,CAAC,EAAE,GAAE;AAIP,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,oBAAiB;IAE3C,gBAAgB,CAAC,OAAyB,EAAE,KAAY,EAAE,SAAc;QAC9E,IAAI,OAAO,CAAC,OAAO,EAAkB,KAAK,SAAS,EAAE;YACjD,IAAI,CAAC,uBAAuB,CAAC,KAAK,EAAE,mBAAmB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC;SACvF;aAAM;YACH,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;SACrD;IACL,CAAC;IAEO,uBAAuB,CAAC,KAAY,EAAE,UAAsC,EAAE,SAAc;QAChG,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,EAAE,CAAA;QACjC,MAAM,OAAO,GAAG,UAAU,CAAC,UAAU,EAAE,CAAA;QAEvC,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;QAE5C,IAAI,OAAO,CAAC,GAAG,EAAE;YAEb,MAAM,IAAI,GAAG,eAAQ,CAAC,YAAY,CAAM,EAAE,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YAE7D,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YAEpC,IAAI,IAAI,CAAC,KAAK;gBAAE,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC5C,IAAI,IAAI,CAAC,IAAI;gBAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC3C;QAED,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;IACvD,CAAC;CACJ,CAAA;AA5BY,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;GACA,kBAAkB,CA4B9B;AA5BY,gDAAkB","sourcesContent":["import { ExecutionContext, Injectable } from \"@nestjs/common\";\nimport type { GqlContextType } from '@nestjs/graphql';\n\n// Sentry imports\nimport { Scope } from '@sentry/hub';\nimport { Handlers } from '@sentry/node';\nimport { SentryInterceptor } from \".\";\n\nlet GqlExecutionContext: any;\ntry {\n ({ GqlExecutionContext } = require('@nestjs/graphql'));\n} catch (e) {}\n\n\n@Injectable()\nexport class GraphqlInterceptor extends SentryInterceptor {\n\n protected captureException(context: ExecutionContext, scope: Scope, exception: any) {\n if (context.getType() === 'graphql') {\n this.captureGraphqlException(scope, GqlExecutionContext.create(context), exception);\n } else {\n super.captureException(context, scope, exception);\n }\n }\n\n private captureGraphqlException(scope: Scope, gqlContext: typeof GqlExecutionContext, exception: any): void {\n const info = gqlContext.getInfo()\n const context = gqlContext.getContext()\n\n scope.setExtra('type', info.parentType.name)\n\n if (context.req) {\n // req within graphql context needs modification in \n const data = Handlers.parseRequest({}, context.req, {});\n\n scope.setExtra('req', data.request);\n\n if (data.extra) scope.setExtras(data.extra);\n if (data.user) scope.setUser(data.user);\n }\n\n this.client.instance().captureException(exception);\n }\n}"]} \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I;gBAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC3C;QAED,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;IACvD,CAAC;CACJ,CAAA;AA5BY,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;GACA,kBAAkB,CA4B9B;AA5BY,gDAAkB","sourcesContent":["import { ExecutionContext, Injectable } from \"@nestjs/common\";\nimport type { GqlContextType } from '@nestjs/graphql';\n\n// Sentry imports\nimport { SentryInterceptor } from \".\";\nimport { extractRequestData, Scope } from \"@sentry/node\";\n\nlet GqlExecutionContext: any;\ntry {\n ({ GqlExecutionContext } = require('@nestjs/graphql'));\n} catch (e) {}\n\n\n@Injectable()\nexport class GraphqlInterceptor extends SentryInterceptor {\n\n protected captureException(context: ExecutionContext, scope: Scope, exception: any) {\n if (context.getType() === 'graphql') {\n this.captureGraphqlException(scope, GqlExecutionContext.create(context), exception);\n } else {\n super.captureException(context, scope, exception);\n }\n }\n\n private captureGraphqlException(scope: Scope, gqlContext: typeof GqlExecutionContext, exception: any): void {\n const info = gqlContext.getInfo()\n const context = gqlContext.getContext()\n\n scope.setExtra('type', info.parentType.name)\n\n if (context.req) {\n // req within graphql context needs modification in \n const data = extractRequestData(context.req, {});\n\n scope.setExtra('req', data.request);\n\n if (data.extra) scope.setExtras(data.extra);\n if (data.user) scope.setUser(data.user);\n }\n\n this.client.instance().captureException(exception);\n }\n}"]} \ No newline at end of file diff --git a/dist/sentry.interceptor.d.ts b/dist/sentry.interceptor.d.ts index d58815a..b8cbe4a 100644 --- a/dist/sentry.interceptor.d.ts +++ b/dist/sentry.interceptor.d.ts @@ -1,8 +1,8 @@ import { CallHandler, ExecutionContext, HttpException, NestInterceptor } from '@nestjs/common'; import { Observable } from 'rxjs'; -import { Scope } from '@sentry/hub'; import { SentryService } from './sentry.service'; import { SentryInterceptorOptions } from './sentry.interfaces'; +import { Scope } from '@sentry/node'; export declare class SentryInterceptor implements NestInterceptor { private readonly options?; protected readonly client: SentryService; diff --git a/dist/sentry.interceptor.js b/dist/sentry.interceptor.js index bf15678..e446c6e 100644 --- a/dist/sentry.interceptor.js +++ b/dist/sentry.interceptor.js @@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.SentryInterceptor = void 0; const common_1 = require("@nestjs/common"); const operators_1 = require("rxjs/operators"); -const node_1 = require("@sentry/node"); const sentry_service_1 = require("./sentry.service"); +const node_1 = require("@sentry/node"); let SentryInterceptor = class SentryInterceptor { constructor(options) { this.options = options; @@ -39,7 +39,7 @@ let SentryInterceptor = class SentryInterceptor { } } captureHttpException(scope, http, exception) { - const data = node_1.Handlers.parseRequest({}, http.getRequest(), this.options); + const data = (0, node_1.extractRequestData)(http.getRequest(), this.options); scope.setExtra('req', data.request); if (data.extra) scope.setExtras(data.extra); diff --git a/dist/sentry.interceptor.js.map b/dist/sentry.interceptor.js.map index d479051..cdcc21d 100644 --- a/dist/sentry.interceptor.js.map +++ b/dist/sentry.interceptor.js.map @@ -1 +1 @@ -{"version":3,"file":"sentry.interceptor.js","sourceRoot":"/","sources":["sentry.interceptor.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,2CAMwB;AASxB,8CAAqC;AAGrC,uCAAwC;AAExC,qDAAiD;AAK1C,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAG5B,YACmB,OAAkC;QAAlC,YAAO,GAAP,OAAO,CAA2B;QAFlC,WAAM,GAAkB,8BAAa,CAAC,qBAAqB,EAAE,CAAA;IAG7E,CAAC;IAEJ,SAAS,CAAC,OAAyB,EAAE,IAAiB;QAEpD,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CACvB,IAAA,eAAG,EAAC,IAAI,EAAE,CAAC,SAAyB,EAAE,EAAE;YACtC,IAAG,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE;gBAC/B,IAAI,CAAC,MAAM,CAAC,QAAQ,EAA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nestjs/common';\nimport { \n HttpArgumentsHost,\n WsArgumentsHost,\n RpcArgumentsHost,\n ContextType\n} from '@nestjs/common/interfaces';\n// Rxjs imports\nimport { Observable } from 'rxjs';\nimport { tap } from 'rxjs/operators';\n// Sentry imports\nimport { Scope } from '@sentry/hub';\nimport { Handlers } from '@sentry/node';\n\nimport { SentryService } from './sentry.service';\nimport { SentryInterceptorOptions, SentryInterceptorOptionsFilter } from './sentry.interfaces';\n\n\n@Injectable()\nexport class SentryInterceptor implements NestInterceptor {\n\n protected readonly client: SentryService = SentryService.SentryServiceInstance()\n constructor(\n private readonly options?: SentryInterceptorOptions\n ) {}\n\n intercept(context: ExecutionContext, next: CallHandler): Observable {\n // first param would be for events, second is for errors\n return next.handle().pipe(\n tap(null, (exception : HttpException) => {\n if(this.shouldReport(exception)) {\n this.client.instance().withScope((scope) => {\n return this.captureException(context, scope, exception);\n })\n }\n })\n );\n }\n\n protected captureException(context: ExecutionContext, scope: Scope, exception: HttpException) {\n switch (context.getType()) {\n case 'http':\n return this.captureHttpException(\n scope, \n context.switchToHttp(), \n exception\n );\n case 'rpc':\n return this.captureRpcException(\n scope,\n context.switchToRpc(),\n exception,\n );\n case 'ws':\n return this.captureWsException(\n scope,\n context.switchToWs(),\n exception,\n );\n }\n }\n\n private captureHttpException(scope: Scope, http: HttpArgumentsHost, exception: HttpException): void {\n const data = Handlers.parseRequest({},http.getRequest(), this.options);\n\n scope.setExtra('req', data.request);\n \n if (data.extra) scope.setExtras(data.extra);\n if (data.user) scope.setUser(data.user);\n\n this.client.instance().captureException(exception);\n }\n\n private captureRpcException(\n scope: Scope,\n rpc: RpcArgumentsHost,\n exception: any,\n ): void {\n scope.setExtra('rpc_data', rpc.getData());\n\n this.client.instance().captureException(exception);\n }\n\n private captureWsException(\n scope: Scope,\n ws: WsArgumentsHost,\n exception: any,\n ): void {\n scope.setExtra('ws_client', ws.getClient());\n scope.setExtra('ws_data', ws.getData());\n\n this.client.instance().captureException(exception);\n }\n\n private shouldReport(exception: any) {\n if (this.options && !this.options.filters) return true;\n\n // If any filter passes, then we do not report\n if (this.options) {\n const opts: SentryInterceptorOptions = this.options as {}\n if (opts.filters) {\n let filters: SentryInterceptorOptionsFilter[] = opts.filters\n return filters.some(({ type, filter }) => {\n return !(exception instanceof type && (!filter || filter(exception)));\n });\n }\n } else {\n return true;\n }\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"sentry.interceptor.js","sourceRoot":"/","sources":["sentry.interceptor.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,2CAMwB;AASxB,8CAAqC;AAGrC,qDAAiD;AAEjD,uCAAyD;AAIlD,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAG5B,YACmB,OAAkC;QAAlC,YAAO,GAAP,OAAO,CAA2B;QAFlC,WAAM,GAAkB,8BAAa,CAAC,qBAAqB,EAAE,CAAA;IAG7E,CAAC;IAEJ,SAAS,CAAC,OAAyB,EAAE,IAAiB;QAEpD,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CACvB,IAAA,eAAG,EAAC,IAAI,EAAE,CAAC,SAAyB,EAAE,EAAE;YACtC,IAAG,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE;gBAC/B,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE;oBACzC,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;gBAC1D,CAAC,CAAC,CAAA;aACH;QACH,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;IAES,gBAAgB,CAAC,OAAyB,EAAE,KAAY,EAAE,SAAwB;QAC1F,QAAQ,OAAO,CAAC,OAAO,EAAe,EAAE;YACtC,KAAK,MAAM;gBACT,OAAO,IAAI,CAAC,oBAAoB,CAC9B,KAAK,EACL,OAAO,CAAC,YAAY,EAAE,EACtB,SAAS,CACV,CAAC;YACJ,KAAK,KAAK;gBACR,O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,SAAS,CAAC,CAAC;IACrD,CAAC;IAEO,YAAY,CAAC,SAAc;QACjC,IAAI,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO;YAAE,OAAO,IAAI,CAAC;QAGvD,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,MAAM,IAAI,GAA6B,IAAI,CAAC,OAAa,CAAA;YACzD,IAAI,IAAI,CAAC,OAAO,EAAE;gBAChB,IAAI,OAAO,GAAqC,IAAI,CAAC,OAAO,CAAA;gBAC5D,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE;oBACvC,OAAO,CAAC,CAAC,SAAS,YAAY,IAAI,IAAI,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;gBACxE,CAAC,CAAC,CAAC;aACJ;SACF;aAAM;YACL,OAAO,IAAI,CAAC;SACb;IACH,CAAC;CACF,CAAA;AA3FY,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;;GACA,iBAAiB,CA2F7B;AA3FY,8CAAiB","sourcesContent":["// Nestjs imports\nimport {\n CallHandler,\n ExecutionContext,\n HttpException,\n Injectable,\n NestInterceptor\n} from '@nestjs/common';\nimport { \n HttpArgumentsHost,\n WsArgumentsHost,\n RpcArgumentsHost,\n ContextType\n} from '@nestjs/common/interfaces';\n// Rxjs imports\nimport { Observable } from 'rxjs';\nimport { tap } from 'rxjs/operators';\n// Sentry imports\n\nimport { SentryService } from './sentry.service';\nimport { SentryInterceptorOptions, SentryInterceptorOptionsFilter } from './sentry.interfaces';\nimport { extractRequestData, Scope } from '@sentry/node';\n\n\n@Injectable()\nexport class SentryInterceptor implements NestInterceptor {\n\n protected readonly client: SentryService = SentryService.SentryServiceInstance()\n constructor(\n private readonly options?: SentryInterceptorOptions\n ) {}\n\n intercept(context: ExecutionContext, next: CallHandler): Observable {\n // first param would be for events, second is for errors\n return next.handle().pipe(\n tap(null, (exception : HttpException) => {\n if(this.shouldReport(exception)) {\n this.client.instance().withScope((scope) => {\n return this.captureException(context, scope, exception);\n })\n }\n })\n );\n }\n\n protected captureException(context: ExecutionContext, scope: Scope, exception: HttpException) {\n switch (context.getType()) {\n case 'http':\n return this.captureHttpException(\n scope, \n context.switchToHttp(), \n exception\n );\n case 'rpc':\n return this.captureRpcException(\n scope,\n context.switchToRpc(),\n exception,\n );\n case 'ws':\n return this.captureWsException(\n scope,\n context.switchToWs(),\n exception,\n );\n }\n }\n\n private captureHttpException(scope: Scope, http: HttpArgumentsHost, exception: HttpException): void {\n const data = extractRequestData(http.getRequest(), this.options);\n\n scope.setExtra('req', data.request);\n \n if (data.extra) scope.setExtras(data.extra);\n if (data.user) scope.setUser(data.user);\n\n this.client.instance().captureException(exception);\n }\n\n private captureRpcException(\n scope: Scope,\n rpc: RpcArgumentsHost,\n exception: any,\n ): void {\n scope.setExtra('rpc_data', rpc.getData());\n\n this.client.instance().captureException(exception);\n }\n\n private captureWsException(\n scope: Scope,\n ws: WsArgumentsHost,\n exception: any,\n ): void {\n scope.setExtra('ws_client', ws.getClient());\n scope.setExtra('ws_data', ws.getData());\n\n this.client.instance().captureException(exception);\n }\n\n private shouldReport(exception: any) {\n if (this.options && !this.options.filters) return true;\n\n // If any filter passes, then we do not report\n if (this.options) {\n const opts: SentryInterceptorOptions = this.options as {}\n if (opts.filters) {\n let filters: SentryInterceptorOptionsFilter[] = opts.filters\n return filters.some(({ type, filter }) => {\n return !(exception instanceof type && (!filter || filter(exception)));\n });\n }\n } else {\n return true;\n }\n }\n}\n"]} \ No newline at end of file diff --git a/dist/sentry.interfaces.d.ts b/dist/sentry.interfaces.d.ts index 08686f5..f4b70a3 100644 --- a/dist/sentry.interfaces.d.ts +++ b/dist/sentry.interfaces.d.ts @@ -37,6 +37,7 @@ export interface SentryInterceptorOptions { }; fingerprint?: string[]; level?: SeverityLevel; + include?: string[]; request?: boolean; serverName?: boolean; transaction?: boolean | 'path' | 'methodPath' | 'handler'; diff --git a/dist/sentry.interfaces.js.map b/dist/sentry.interfaces.js.map index 1040a57..57b9216 100644 --- a/dist/sentry.interfaces.js.map +++ b/dist/sentry.interfaces.js.map @@ -1 +1 @@ -{"version":3,"file":"sentry.interfaces.js","sourceRoot":"/","sources":["sentry.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["import { ModuleMetadata, Type } from \"@nestjs/common/interfaces\";\nimport { Integration, Options } from '@sentry/types';\nimport { ConsoleLoggerOptions, HttpException } from \"@nestjs/common\";\nimport { SeverityLevel } from \"@sentry/node\";\n\nexport interface SentryCloseOptions {\n enabled: boolean;\n // timeout – Maximum time in ms the client should wait until closing forcefully\n timeout?: number;\n}\n\nexport type SentryModuleOptions = Omit & {\n integrations?: Integration[];\n close?: SentryCloseOptions\n} & ConsoleLoggerOptions;\n\nexport interface SentryOptionsFactory {\n createSentryModuleOptions(): Promise | SentryModuleOptions;\n}\n\nexport interface SentryModuleAsyncOptions extends Pick {\n inject?: any[];\n useClass?: Type;\n useExisting?: Type;\n useFactory?: (...args: any[]) => Promise | SentryModuleOptions;\n}\n\nexport type SentryTransaction = boolean | 'path' | 'methodPath' | 'handler';\n\nexport interface SentryFilterFunction {\n (exception:any): boolean\n}\n\nexport interface SentryInterceptorOptionsFilter {\n type: any;\n filter?: SentryFilterFunction;\n}\n\nexport interface SentryInterceptorOptions {\n filters?: SentryInterceptorOptionsFilter[];\n tags?: { [key: string]: string };\n extra?: { [key: string]: any };\n fingerprint?: string[];\n level?: SeverityLevel;\n\n // https://github.com/getsentry/sentry-javascript/blob/master/packages/node/src/handlers.ts#L163\n request?: boolean;\n serverName?: boolean;\n transaction?: boolean | 'path' | 'methodPath' | 'handler'; // https://github.com/getsentry/sentry-javascript/blob/master/packages/node/src/handlers.ts#L16\n user?: boolean | string[];\n version?: boolean;\n}"]} \ No newline at end of file +{"version":3,"file":"sentry.interfaces.js","sourceRoot":"/","sources":["sentry.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["import { ModuleMetadata, Type } from \"@nestjs/common/interfaces\";\nimport { Integration, Options } from '@sentry/types';\nimport { ConsoleLoggerOptions, HttpException } from \"@nestjs/common\";\nimport { SeverityLevel } from \"@sentry/node\";\n\nexport interface SentryCloseOptions {\n enabled: boolean;\n // timeout – Maximum time in ms the client should wait until closing forcefully\n timeout?: number;\n}\n\nexport type SentryModuleOptions = Omit & {\n integrations?: Integration[];\n close?: SentryCloseOptions\n} & ConsoleLoggerOptions;\n\nexport interface SentryOptionsFactory {\n createSentryModuleOptions(): Promise | SentryModuleOptions;\n}\n\nexport interface SentryModuleAsyncOptions extends Pick {\n inject?: any[];\n useClass?: Type;\n useExisting?: Type;\n useFactory?: (...args: any[]) => Promise | SentryModuleOptions;\n}\n\nexport type SentryTransaction = boolean | 'path' | 'methodPath' | 'handler';\n\nexport interface SentryFilterFunction {\n (exception:any): boolean\n}\n\nexport interface SentryInterceptorOptionsFilter {\n type: any;\n filter?: SentryFilterFunction;\n}\n\nexport interface SentryInterceptorOptions {\n filters?: SentryInterceptorOptionsFilter[];\n tags?: { [key: string]: string };\n extra?: { [key: string]: any };\n fingerprint?: string[];\n level?: SeverityLevel;\n\n // https://github.com/getsentry/sentry-javascript/blob/615c670cfe283e77132339c3d9751060f30d3956/packages/utils/src/requestdata.ts#L148\n include?: string[];\n\n // https://github.com/getsentry/sentry-javascript/blob/master/packages/node/src/handlers.ts#L163\n request?: boolean;\n /**\n * @deprecated Not used anymore in Sentry v8.0\n */\n serverName?: boolean;\n transaction?: boolean | 'path' | 'methodPath' | 'handler'; // https://github.com/getsentry/sentry-javascript/blob/master/packages/node/src/handlers.ts#L16\n user?: boolean | string[];\n /**\n * @deprecated Not used anymore in Sentry v8.0\n */\n version?: boolean;\n}"]} \ No newline at end of file diff --git a/dist/sentry.service.js b/dist/sentry.service.js index 5e2857b..fb4790b 100644 --- a/dist/sentry.service.js +++ b/dist/sentry.service.js @@ -47,18 +47,18 @@ let SentryService = SentryService_1 = class SentryService extends common_1.Conso } const { debug, integrations = [] } = opts, sentryOptions = __rest(opts, ["debug", "integrations"]); Sentry.init(Object.assign(Object.assign({}, sentryOptions), { integrations: [ - new Sentry.Integrations.OnUncaughtException({ + Sentry.onUncaughtExceptionIntegration({ onFatalError: (err) => __awaiter(this, void 0, void 0, function* () { if (err.name === 'SentryError') { console.log(err); } else { - Sentry.getCurrentHub().getClient().captureException(err); + Sentry.getClient().captureException(err); process.exit(1); } }), }), - new Sentry.Integrations.OnUnhandledRejection({ mode: 'warn' }), + Sentry.onUnhandledRejectionIntegration({ mode: 'warn' }), ...integrations, ] })); } diff --git a/dist/sentry.service.js.map b/dist/sentry.service.js.map index 5a9ef20..1b8ab54 100644 --- a/dist/sentry.service.js.map +++ b/dist/sentry.service.js.map @@ -1 +1 @@ -{"version":3,"file":"sentry.service.js","sourceRoot":"/","sources":["sentry.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAmE;AAGnE,uCAAuC;AACvC,yDAA2D;AAIpD,IAAM,aAAa,qBAAnB,MAAM,aAAc,SAAQ,sBAAa;IAG9C,YAEW,IAA0B;QAEnC,KAAK,EAAE,CAAC;QAFC,SAAI,GAAJ,IAAI,CAAsB;QAJrC,QAAG,GAAG,0BAA0B,CAAC;QAO/B,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE;YAEvB,OAAO;SACR;QACD,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,EAAE,KAAuB,IAAI,EAAtB,aAAa,UAAK,IAAI,EAArD,yBAA8C,CAAO,CAAC;QAC5D,MAAM,CAAC,IAAI,iCACN,aAAa,KAChB,YAAY,EAAE;gBACZ,IAAI,MAAM,CAAC,YAAY,CAAC,mBAAmB,CAAC;oBAC1C,YAAY,EAAE,CAAO,GAAU,EAAE,EAAE;wBAGjC,IAAI,GAAG,CAAC,IAAI,KAAK,aAAa,EAAE;4BAC9B,OAAO,CAAC,GAAG,C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;oBACb,IAAI,EAAE;wBACJ,OAAO;qBACR;iBACF,CAAC,CAAC,CAAC;gBACJ,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;SACxC;QAAC,OAAO,GAAG,EAAE,GAAE;IAClB,CAAC;IAED,QAAQ;QACN,OAAO,MAAM,CAAC;IAChB,CAAC;IAEK,qBAAqB,CAAC,MAAe;;;YACzC,IAAI,CAAA,MAAA,MAAA,IAAI,CAAC,IAAI,0CAAE,KAAK,0CAAE,OAAO,MAAK,IAAI,EAAE;gBACtC,MAAM,MAAM,CAAC,KAAK,CAAC,MAAA,IAAI,CAAC,IAAI,0CAAE,KAAK,CAAC,OAAO,CAAC,CAAC;aAC9C;;KACF;CACF,CAAA;AA9HY,aAAa;IADzB,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,eAAM,EAAC,wCAAqB,CAAC,CAAA;;GAJrB,aAAa,CA8HzB;AA9HY,sCAAa","sourcesContent":["import { Inject, Injectable, ConsoleLogger } from '@nestjs/common';\nimport { OnApplicationShutdown } from '@nestjs/common';\nimport { ClientOptions, Client } from '@sentry/types';\nimport * as Sentry from '@sentry/node';\nimport { SENTRY_MODULE_OPTIONS } from './sentry.constants';\nimport { SentryModuleOptions } from './sentry.interfaces';\n\n@Injectable()\nexport class SentryService extends ConsoleLogger implements OnApplicationShutdown {\n app = '@ntegral/nestjs-sentry: ';\n private static serviceInstance: SentryService;\n constructor(\n @Inject(SENTRY_MODULE_OPTIONS)\n readonly opts?: SentryModuleOptions,\n ) {\n super();\n if (!(opts && opts.dsn)) {\n // console.log('options not found. Did you use SentryModule.forRoot?');\n return;\n }\n const { debug, integrations = [], ...sentryOptions } = opts;\n Sentry.init({\n ...sentryOptions,\n integrations: [\n new Sentry.Integrations.OnUncaughtException({\n onFatalError: async (err: Error) => {\n // console.error('uncaughtException, not cool!')\n // console.error(err);\n if (err.name === 'SentryError') {\n console.log(err);\n } else {\n (\n Sentry.getCurrentHub().getClient<\n Client\n >() as Client\n ).captureException(err);\n process.exit(1);\n }\n },\n }),\n new Sentry.Integrations.OnUnhandledRejection({ mode: 'warn' }),\n ...integrations,\n ],\n });\n }\n\n public static SentryServiceInstance(): SentryService {\n if (!SentryService.serviceInstance) {\n SentryService.serviceInstance = new SentryService();\n }\n return SentryService.serviceInstance;\n }\n\n log(message: string, context?: string, asBreadcrumb?: boolean) {\n message = `${this.app} ${message}`;\n try {\n super.log(message, context);\n asBreadcrumb ?\n Sentry.addBreadcrumb({\n message,\n level: 'log',\n data: {\n context\n }\n }) :\n Sentry.captureMessage(message, 'log');\n } catch (err) {}\n }\n\n error(message: string, trace?: string, context?: string) {\n message = `${this.app} ${message}`;\n try {\n super.error(message, trace, context);\n Sentry.captureMessage(message, 'error');\n } catch (err) {}\n }\n\n warn(message: string, context?: string, asBreadcrumb?: boolean) {\n message = `${this.app} ${message}`;\n try {\n super.warn(message, context);\n asBreadcrumb ?\n Sentry.addBreadcrumb({\n message,\n level: 'warning',\n data: {\n context\n }\n }) :\n Sentry.captureMessage(message, 'warning');\n } catch (err) {}\n }\n\n debug(message: string, context?: string, asBreadcrumb?: boolean) {\n message = `${this.app} ${message}`;\n try {\n super.debug(message, context);\n asBreadcrumb ?\n Sentry.addBreadcrumb({\n message,\n level: 'debug',\n data: {\n context\n }\n }) :\n Sentry.captureMessage(message, 'debug');\n } catch (err) {}\n }\n\n verbose(message: string, context?: string, asBreadcrumb?: boolean) {\n message = `${this.app} ${message}`;\n try {\n super.verbose(message, context);\n asBreadcrumb ?\n Sentry.addBreadcrumb({\n message,\n level: 'info',\n data: {\n context\n }\n }) :\n Sentry.captureMessage(message, 'info');\n } catch (err) {}\n }\n\n instance() {\n return Sentry;\n }\n\n async onApplicationShutdown(signal?: string) {\n if (this.opts?.close?.enabled === true) {\n await Sentry.close(this.opts?.close.timeout);\n }\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"sentry.service.js","sourceRoot":"/","sources":["sentry.service.ts"],"names":[],"mappings":";;;;;;;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oleLogger } from '@nestjs/common';\nimport { OnApplicationShutdown } from '@nestjs/common';\nimport { ClientOptions, Client } from '@sentry/types';\nimport * as Sentry from '@sentry/node';\nimport { SENTRY_MODULE_OPTIONS } from './sentry.constants';\nimport { SentryModuleOptions } from './sentry.interfaces';\n\n@Injectable()\nexport class SentryService extends ConsoleLogger implements OnApplicationShutdown {\n app = '@ntegral/nestjs-sentry: ';\n private static serviceInstance: SentryService;\n constructor(\n @Inject(SENTRY_MODULE_OPTIONS)\n readonly opts?: SentryModuleOptions,\n ) {\n super();\n if (!(opts && opts.dsn)) {\n // console.log('options not found. Did you use SentryModule.forRoot?');\n return;\n }\n const { debug, integrations = [], ...sentryOptions } = opts;\n Sentry.init({\n ...sentryOptions,\n integrations: [\n Sentry.onUncaughtExceptionIntegration({\n onFatalError: async (err: Error) => {\n // console.error('uncaughtException, not cool!')\n // console.error(err);\n if (err.name === 'SentryError') {\n console.log(err);\n } else {\n (\n Sentry.getClient<\n Client\n >() as Client\n ).captureException(err);\n process.exit(1);\n }\n },\n }),\n Sentry.onUnhandledRejectionIntegration({ mode: 'warn' }),\n ...integrations,\n ],\n });\n }\n\n public static SentryServiceInstance(): SentryService {\n if (!SentryService.serviceInstance) {\n SentryService.serviceInstance = new SentryService();\n }\n return SentryService.serviceInstance;\n }\n\n log(message: string, context?: string, asBreadcrumb?: boolean) {\n message = `${this.app} ${message}`;\n try {\n super.log(message, context);\n asBreadcrumb ?\n Sentry.addBreadcrumb({\n message,\n level: 'log',\n data: {\n context\n }\n }) :\n Sentry.captureMessage(message, 'log');\n } catch (err) {}\n }\n\n error(message: string, trace?: string, context?: string) {\n message = `${this.app} ${message}`;\n try {\n super.error(message, trace, context);\n Sentry.captureMessage(message, 'error');\n } catch (err) {}\n }\n\n warn(message: string, context?: string, asBreadcrumb?: boolean) {\n message = `${this.app} ${message}`;\n try {\n super.warn(message, context);\n asBreadcrumb ?\n Sentry.addBreadcrumb({\n message,\n level: 'warning',\n data: {\n context\n }\n }) :\n Sentry.captureMessage(message, 'warning');\n } catch (err) {}\n }\n\n debug(message: string, context?: string, asBreadcrumb?: boolean) {\n message = `${this.app} ${message}`;\n try {\n super.debug(message, context);\n asBreadcrumb ?\n Sentry.addBreadcrumb({\n message,\n level: 'debug',\n data: {\n context\n }\n }) :\n Sentry.captureMessage(message, 'debug');\n } catch (err) {}\n }\n\n verbose(message: string, context?: string, asBreadcrumb?: boolean) {\n message = `${this.app} ${message}`;\n try {\n super.verbose(message, context);\n asBreadcrumb ?\n Sentry.addBreadcrumb({\n message,\n level: 'info',\n data: {\n context\n }\n }) :\n Sentry.captureMessage(message, 'info');\n } catch (err) {}\n }\n\n instance() {\n return Sentry;\n }\n\n async onApplicationShutdown(signal?: string) {\n if (this.opts?.close?.enabled === true) {\n await Sentry.close(this.opts?.close.timeout);\n }\n }\n}\n"]} \ No newline at end of file diff --git a/lib/graphql.interceptor.ts b/lib/graphql.interceptor.ts index 207965f..e9f6fd6 100644 --- a/lib/graphql.interceptor.ts +++ b/lib/graphql.interceptor.ts @@ -2,9 +2,8 @@ import { ExecutionContext, Injectable } from "@nestjs/common"; import type { GqlContextType } from '@nestjs/graphql'; // Sentry imports -import { Scope } from '@sentry/hub'; -import { Handlers } from '@sentry/node'; import { SentryInterceptor } from "."; +import { extractRequestData, Scope } from "@sentry/node"; let GqlExecutionContext: any; try { @@ -31,7 +30,7 @@ export class GraphqlInterceptor extends SentryInterceptor { if (context.req) { // req within graphql context needs modification in - const data = Handlers.parseRequest({}, context.req, {}); + const data = extractRequestData(context.req, {}); scope.setExtra('req', data.request); diff --git a/lib/sentry.interceptor.ts b/lib/sentry.interceptor.ts index e978677..bb67eea 100644 --- a/lib/sentry.interceptor.ts +++ b/lib/sentry.interceptor.ts @@ -16,11 +16,10 @@ import { import { Observable } from 'rxjs'; import { tap } from 'rxjs/operators'; // Sentry imports -import { Scope } from '@sentry/hub'; -import { Handlers } from '@sentry/node'; import { SentryService } from './sentry.service'; import { SentryInterceptorOptions, SentryInterceptorOptionsFilter } from './sentry.interfaces'; +import { extractRequestData, Scope } from '@sentry/node'; @Injectable() @@ -68,7 +67,7 @@ export class SentryInterceptor implements NestInterceptor { } private captureHttpException(scope: Scope, http: HttpArgumentsHost, exception: HttpException): void { - const data = Handlers.parseRequest({},http.getRequest(), this.options); + const data = extractRequestData(http.getRequest(), this.options); scope.setExtra('req', data.request); diff --git a/lib/sentry.interfaces.ts b/lib/sentry.interfaces.ts index 4410406..ad5155b 100644 --- a/lib/sentry.interfaces.ts +++ b/lib/sentry.interfaces.ts @@ -43,10 +43,19 @@ export interface SentryInterceptorOptions { fingerprint?: string[]; level?: SeverityLevel; + // https://github.com/getsentry/sentry-javascript/blob/615c670cfe283e77132339c3d9751060f30d3956/packages/utils/src/requestdata.ts#L148 + include?: string[]; + // https://github.com/getsentry/sentry-javascript/blob/master/packages/node/src/handlers.ts#L163 request?: boolean; + /** + * @deprecated Not used anymore in Sentry v8.0 + */ serverName?: boolean; transaction?: boolean | 'path' | 'methodPath' | 'handler'; // https://github.com/getsentry/sentry-javascript/blob/master/packages/node/src/handlers.ts#L16 user?: boolean | string[]; + /** + * @deprecated Not used anymore in Sentry v8.0 + */ version?: boolean; } \ No newline at end of file diff --git a/lib/sentry.service.ts b/lib/sentry.service.ts index 78d6f3c..cd6364a 100644 --- a/lib/sentry.service.ts +++ b/lib/sentry.service.ts @@ -22,7 +22,7 @@ export class SentryService extends ConsoleLogger implements OnApplicationShutdow Sentry.init({ ...sentryOptions, integrations: [ - new Sentry.Integrations.OnUncaughtException({ + Sentry.onUncaughtExceptionIntegration({ onFatalError: async (err: Error) => { // console.error('uncaughtException, not cool!') // console.error(err); @@ -30,7 +30,7 @@ export class SentryService extends ConsoleLogger implements OnApplicationShutdow console.log(err); } else { ( - Sentry.getCurrentHub().getClient< + Sentry.getClient< Client >() as Client ).captureException(err); @@ -38,7 +38,7 @@ export class SentryService extends ConsoleLogger implements OnApplicationShutdow } }, }), - new Sentry.Integrations.OnUnhandledRejection({ mode: 'warn' }), + Sentry.onUnhandledRejectionIntegration({ mode: 'warn' }), ...integrations, ], }); diff --git a/package-lock.json b/package-lock.json index 879f3ae..1dc756e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,18 +1,16 @@ { "name": "@ntegral/nestjs-sentry", - "version": "4.0.0", + "version": "4.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ntegral/nestjs-sentry", - "version": "4.0.0", + "version": "4.0.1", "license": "ISC", - "dependencies": { - "user": "^0.0.0" - }, "devDependencies": { "@nestjs/testing": "10.3.0", + "@sentry/types": "^8.26.0", "@types/jest": "28.1.6", "@types/node": "^18.0.6", "@types/supertest": "^2.0.12", @@ -30,8 +28,7 @@ "peerDependencies": { "@nestjs/common": ">=10.0.0", "@nestjs/core": ">=10.0.0", - "@sentry/hub": "^7.7.0", - "@sentry/node": "^7.7.0", + "@sentry/node": "^8.26.0", "reflect-metadata": "^0.1.13", "rimraf": "^3.0.2", "rxjs": "^7.2.0" @@ -1298,82 +1295,620 @@ "npm": ">=5.0.0" } }, - "node_modules/@sentry-internal/tracing": { - "version": "7.92.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.92.0.tgz", - "integrity": "sha512-ur55vPcUUUWFUX4eVLNP71ohswK7ZZpleNZw9Y1GfLqyI+0ILQUwjtzqItJrdClvVsdRZJMRmDV40Hp9Lbb9mA==", + "node_modules/@opentelemetry/api": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", + "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", + "peer": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@opentelemetry/api-logs": { + "version": "0.52.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.52.1.tgz", + "integrity": "sha512-qnSqB2DQ9TPP96dl8cDubDvrUyWc0/sK81xHTK8eSUspzDM3bsewX903qclQFvVhgStjRWdC5bLb3kQqMkfV5A==", "peer": true, "dependencies": { - "@sentry/core": "7.92.0", - "@sentry/types": "7.92.0", - "@sentry/utils": "7.92.0" + "@opentelemetry/api": "^1.0.0" }, "engines": { - "node": ">=8" + "node": ">=14" + } + }, + "node_modules/@opentelemetry/context-async-hooks": { + "version": "1.25.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.25.1.tgz", + "integrity": "sha512-UW/ge9zjvAEmRWVapOP0qyCvPulWU6cQxGxDbWEFfGOj1VBBZAuOqTo3X6yWmDTD3Xe15ysCZChHncr2xFMIfQ==", + "peer": true, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, - "node_modules/@sentry/core": { - "version": "7.92.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.92.0.tgz", - "integrity": "sha512-1Tly7YB2I1byI5xb0Cwrxs56Rhww+6mQ7m9P7rTmdC3/ijOzbEoohtYIUPwcooCEarpbEJe/tAayRx6BrH2UbQ==", + "node_modules/@opentelemetry/core": { + "version": "1.25.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.25.1.tgz", + "integrity": "sha512-GeT/l6rBYWVQ4XArluLVB6WWQ8flHbdb6r2FCHC3smtdOAbrJBIv35tpV/yp9bmYUJf+xmZpu9DRTIeJVhFbEQ==", "peer": true, "dependencies": { - "@sentry/types": "7.92.0", - "@sentry/utils": "7.92.0" + "@opentelemetry/semantic-conventions": "1.25.1" }, "engines": { - "node": ">=8" + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, - "node_modules/@sentry/hub": { - "version": "7.92.0", - "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-7.92.0.tgz", - "integrity": "sha512-qhKv5VOUbkgsgD5xfH1znnKJlfZ2NqsXcgCaLH1QWZlYOWBCChuhhB5R6t+1NLMu4UBMT4BnOwkCbdqrXJsh/g==", + "node_modules/@opentelemetry/core/node_modules/@opentelemetry/semantic-conventions": { + "version": "1.25.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.25.1.tgz", + "integrity": "sha512-ZDjMJJQRlyk8A1KZFCc+bCbsyrn1wTwdNt56F7twdfUfnHUZUq77/WfONCj8p72NZOyP7pNTdUWSTYC3GTbuuQ==", + "peer": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@opentelemetry/instrumentation": { + "version": "0.52.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.52.1.tgz", + "integrity": "sha512-uXJbYU/5/MBHjMp1FqrILLRuiJCs3Ofk0MeRDk8g1S1gD47U8X3JnSwcMO1rtRo1x1a7zKaQHaoYu49p/4eSKw==", "peer": true, "dependencies": { - "@sentry/core": "7.92.0", - "@sentry/types": "7.92.0", - "@sentry/utils": "7.92.0" + "@opentelemetry/api-logs": "0.52.1", + "@types/shimmer": "^1.0.2", + "import-in-the-middle": "^1.8.1", + "require-in-the-middle": "^7.1.1", + "semver": "^7.5.2", + "shimmer": "^1.2.1" }, "engines": { - "node": ">=8" + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-connect": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-connect/-/instrumentation-connect-0.38.0.tgz", + "integrity": "sha512-2/nRnx3pjYEmdPIaBwtgtSviTKHWnDZN3R+TkRUnhIVrvBKVcq+I5B2rtd6mr6Fe9cHlZ9Ojcuh7pkNh/xdWWg==", + "peer": true, + "dependencies": { + "@opentelemetry/core": "^1.8.0", + "@opentelemetry/instrumentation": "^0.52.0", + "@opentelemetry/semantic-conventions": "^1.22.0", + "@types/connect": "3.4.36" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-express": { + "version": "0.41.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-express/-/instrumentation-express-0.41.1.tgz", + "integrity": "sha512-uRx0V3LPGzjn2bxAnV8eUsDT82vT7NTwI0ezEuPMBOTOsnPpGhWdhcdNdhH80sM4TrWrOfXm9HGEdfWE3TRIww==", + "peer": true, + "dependencies": { + "@opentelemetry/core": "^1.8.0", + "@opentelemetry/instrumentation": "^0.52.0", + "@opentelemetry/semantic-conventions": "^1.22.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-fastify": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fastify/-/instrumentation-fastify-0.38.0.tgz", + "integrity": "sha512-HBVLpTSYpkQZ87/Df3N0gAw7VzYZV3n28THIBrJWfuqw3Or7UqdhnjeuMIPQ04BKk3aZc0cWn2naSQObbh5vXw==", + "peer": true, + "dependencies": { + "@opentelemetry/core": "^1.8.0", + "@opentelemetry/instrumentation": "^0.52.0", + "@opentelemetry/semantic-conventions": "^1.22.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-fs": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fs/-/instrumentation-fs-0.14.0.tgz", + "integrity": "sha512-pVc8P5AgliC1DphyyBUgsxXlm2XaPH4BpYvt7rAZDMIqUpRk8gs19SioABtKqqxvFzg5jPtgJfJsdxq0Y+maLw==", + "peer": true, + "dependencies": { + "@opentelemetry/core": "^1.8.0", + "@opentelemetry/instrumentation": "^0.52.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-graphql": { + "version": "0.42.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-graphql/-/instrumentation-graphql-0.42.0.tgz", + "integrity": "sha512-N8SOwoKL9KQSX7z3gOaw5UaTeVQcfDO1c21csVHnmnmGUoqsXbArK2B8VuwPWcv6/BC/i3io+xTo7QGRZ/z28Q==", + "peer": true, + "dependencies": { + "@opentelemetry/instrumentation": "^0.52.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-hapi": { + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-hapi/-/instrumentation-hapi-0.40.0.tgz", + "integrity": "sha512-8U/w7Ifumtd2bSN1OLaSwAAFhb9FyqWUki3lMMB0ds+1+HdSxYBe9aspEJEgvxAqOkrQnVniAPTEGf1pGM7SOw==", + "peer": true, + "dependencies": { + "@opentelemetry/core": "^1.8.0", + "@opentelemetry/instrumentation": "^0.52.0", + "@opentelemetry/semantic-conventions": "^1.22.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-http": { + "version": "0.52.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.52.1.tgz", + "integrity": "sha512-dG/aevWhaP+7OLv4BQQSEKMJv8GyeOp3Wxl31NHqE8xo9/fYMfEljiZphUHIfyg4gnZ9swMyWjfOQs5GUQe54Q==", + "peer": true, + "dependencies": { + "@opentelemetry/core": "1.25.1", + "@opentelemetry/instrumentation": "0.52.1", + "@opentelemetry/semantic-conventions": "1.25.1", + "semver": "^7.5.2" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-http/node_modules/@opentelemetry/semantic-conventions": { + "version": "1.25.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.25.1.tgz", + "integrity": "sha512-ZDjMJJQRlyk8A1KZFCc+bCbsyrn1wTwdNt56F7twdfUfnHUZUq77/WfONCj8p72NZOyP7pNTdUWSTYC3GTbuuQ==", + "peer": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@opentelemetry/instrumentation-http/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "peer": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@opentelemetry/instrumentation-ioredis": { + "version": "0.42.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-ioredis/-/instrumentation-ioredis-0.42.0.tgz", + "integrity": "sha512-P11H168EKvBB9TUSasNDOGJCSkpT44XgoM6d3gRIWAa9ghLpYhl0uRkS8//MqPzcJVHr3h3RmfXIpiYLjyIZTw==", + "peer": true, + "dependencies": { + "@opentelemetry/instrumentation": "^0.52.0", + "@opentelemetry/redis-common": "^0.36.2", + "@opentelemetry/semantic-conventions": "^1.23.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-koa": { + "version": "0.42.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-koa/-/instrumentation-koa-0.42.0.tgz", + "integrity": "sha512-H1BEmnMhho8o8HuNRq5zEI4+SIHDIglNB7BPKohZyWG4fWNuR7yM4GTlR01Syq21vODAS7z5omblScJD/eZdKw==", + "peer": true, + "dependencies": { + "@opentelemetry/core": "^1.8.0", + "@opentelemetry/instrumentation": "^0.52.0", + "@opentelemetry/semantic-conventions": "^1.22.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-mongodb": { + "version": "0.46.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.46.0.tgz", + "integrity": "sha512-VF/MicZ5UOBiXrqBslzwxhN7TVqzu1/LN/QDpkskqM0Zm0aZ4CVRbUygL8d7lrjLn15x5kGIe8VsSphMfPJzlA==", + "peer": true, + "dependencies": { + "@opentelemetry/instrumentation": "^0.52.0", + "@opentelemetry/sdk-metrics": "^1.9.1", + "@opentelemetry/semantic-conventions": "^1.22.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-mongoose": { + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongoose/-/instrumentation-mongoose-0.40.0.tgz", + "integrity": "sha512-niRi5ZUnkgzRhIGMOozTyoZIvJKNJyhijQI4nF4iFSb+FUx2v5fngfR+8XLmdQAO7xmsD8E5vEGdDVYVtKbZew==", + "peer": true, + "dependencies": { + "@opentelemetry/core": "^1.8.0", + "@opentelemetry/instrumentation": "^0.52.0", + "@opentelemetry/semantic-conventions": "^1.22.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-mysql": { + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql/-/instrumentation-mysql-0.40.0.tgz", + "integrity": "sha512-d7ja8yizsOCNMYIJt5PH/fKZXjb/mS48zLROO4BzZTtDfhNCl2UM/9VIomP2qkGIFVouSJrGr/T00EzY7bPtKA==", + "peer": true, + "dependencies": { + "@opentelemetry/instrumentation": "^0.52.0", + "@opentelemetry/semantic-conventions": "^1.22.0", + "@types/mysql": "2.15.22" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-mysql2": { + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql2/-/instrumentation-mysql2-0.40.0.tgz", + "integrity": "sha512-0xfS1xcqUmY7WE1uWjlmI67Xg3QsSUlNT+AcXHeA4BDUPwZtWqF4ezIwLgpVZfHOnkAEheqGfNSWd1PIu3Wnfg==", + "peer": true, + "dependencies": { + "@opentelemetry/instrumentation": "^0.52.0", + "@opentelemetry/semantic-conventions": "^1.22.0", + "@opentelemetry/sql-common": "^0.40.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-nestjs-core": { + "version": "0.39.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-nestjs-core/-/instrumentation-nestjs-core-0.39.0.tgz", + "integrity": "sha512-mewVhEXdikyvIZoMIUry8eb8l3HUjuQjSjVbmLVTt4NQi35tkpnHQrG9bTRBrl3403LoWZ2njMPJyg4l6HfKvA==", + "peer": true, + "dependencies": { + "@opentelemetry/instrumentation": "^0.52.0", + "@opentelemetry/semantic-conventions": "^1.23.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-pg": { + "version": "0.43.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pg/-/instrumentation-pg-0.43.0.tgz", + "integrity": "sha512-og23KLyoxdnAeFs1UWqzSonuCkePUzCX30keSYigIzJe/6WSYA8rnEI5lobcxPEzg+GcU06J7jzokuEHbjVJNw==", + "peer": true, + "dependencies": { + "@opentelemetry/instrumentation": "^0.52.0", + "@opentelemetry/semantic-conventions": "^1.22.0", + "@opentelemetry/sql-common": "^0.40.1", + "@types/pg": "8.6.1", + "@types/pg-pool": "2.0.4" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-redis-4": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis-4/-/instrumentation-redis-4-0.41.0.tgz", + "integrity": "sha512-H7IfGTqW2reLXqput4yzAe8YpDC0fmVNal95GHMLOrS89W+qWUKIqxolSh63hJyfmwPSFwXASzj7wpSk8Az+Dg==", + "peer": true, + "dependencies": { + "@opentelemetry/instrumentation": "^0.52.0", + "@opentelemetry/redis-common": "^0.36.2", + "@opentelemetry/semantic-conventions": "^1.22.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "peer": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@opentelemetry/redis-common": { + "version": "0.36.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/redis-common/-/redis-common-0.36.2.tgz", + "integrity": "sha512-faYX1N0gpLhej/6nyp6bgRjzAKXn5GOEMYY7YhciSfCoITAktLUtQ36d24QEWNA1/WA1y6qQunCe0OhHRkVl9g==", + "peer": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@opentelemetry/resources": { + "version": "1.25.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.25.1.tgz", + "integrity": "sha512-pkZT+iFYIZsVn6+GzM0kSX+u3MSLCY9md+lIJOoKl/P+gJFfxJte/60Usdp8Ce4rOs8GduUpSPNe1ddGyDT1sQ==", + "peer": true, + "dependencies": { + "@opentelemetry/core": "1.25.1", + "@opentelemetry/semantic-conventions": "1.25.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/resources/node_modules/@opentelemetry/semantic-conventions": { + "version": "1.25.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.25.1.tgz", + "integrity": "sha512-ZDjMJJQRlyk8A1KZFCc+bCbsyrn1wTwdNt56F7twdfUfnHUZUq77/WfONCj8p72NZOyP7pNTdUWSTYC3GTbuuQ==", + "peer": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@opentelemetry/sdk-metrics": { + "version": "1.25.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.25.1.tgz", + "integrity": "sha512-9Mb7q5ioFL4E4dDrc4wC/A3NTHDat44v4I3p2pLPSxRvqUbDIQyMVr9uK+EU69+HWhlET1VaSrRzwdckWqY15Q==", + "peer": true, + "dependencies": { + "@opentelemetry/core": "1.25.1", + "@opentelemetry/resources": "1.25.1", + "lodash.merge": "^4.6.2" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.3.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/sdk-trace-base": { + "version": "1.25.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.25.1.tgz", + "integrity": "sha512-C8k4hnEbc5FamuZQ92nTOp8X/diCY56XUTnMiv9UTuJitCzaNNHAVsdm5+HLCdI8SLQsLWIrG38tddMxLVoftw==", + "peer": true, + "dependencies": { + "@opentelemetry/core": "1.25.1", + "@opentelemetry/resources": "1.25.1", + "@opentelemetry/semantic-conventions": "1.25.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/semantic-conventions": { + "version": "1.25.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.25.1.tgz", + "integrity": "sha512-ZDjMJJQRlyk8A1KZFCc+bCbsyrn1wTwdNt56F7twdfUfnHUZUq77/WfONCj8p72NZOyP7pNTdUWSTYC3GTbuuQ==", + "peer": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@opentelemetry/semantic-conventions": { + "version": "1.26.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.26.0.tgz", + "integrity": "sha512-U9PJlOswJPSgQVPI+XEuNLElyFWkb0hAiMg+DExD9V0St03X2lPHGMdxMY/LrVmoukuIpXJ12oyrOtEZ4uXFkw==", + "peer": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@opentelemetry/sql-common": { + "version": "0.40.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sql-common/-/sql-common-0.40.1.tgz", + "integrity": "sha512-nSDlnHSqzC3pXn/wZEZVLuAuJ1MYMXPBwtv2qAbCa3847SaHItdE7SzUq/Jtb0KZmh1zfAbNi3AAMjztTT4Ugg==", + "peer": true, + "dependencies": { + "@opentelemetry/core": "^1.1.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.1.0" + } + }, + "node_modules/@prisma/instrumentation": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@prisma/instrumentation/-/instrumentation-5.17.0.tgz", + "integrity": "sha512-c1Sle4ji8aasMcYfBBHFM56We4ljfenVtRmS8aY06BllS7SoU6SmJBwG7vil+GHiR0Yrh+t9iBwt4AY0Jr4KNQ==", + "peer": true, + "dependencies": { + "@opentelemetry/api": "^1.8", + "@opentelemetry/instrumentation": "^0.49 || ^0.50 || ^0.51 || ^0.52.0", + "@opentelemetry/sdk-trace-base": "^1.22" } }, "node_modules/@sentry/node": { - "version": "7.92.0", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.92.0.tgz", - "integrity": "sha512-LZeQL1r6kikEoOzA9K61OmMl32/lK/6PzmFNDH6z7UYwQopCZgVA6IP+CZuln8K2ys5c9hCyF7ICQMysXfpNJA==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-8.26.0.tgz", + "integrity": "sha512-N9mNLzicnfGgsq6P10ckPdTzEFusjTC7gpqPopwq5eEMF7g798hH8CcE5o6FZ4iAAR3vWliAR/jgccdoMmJMpQ==", "peer": true, "dependencies": { - "@sentry-internal/tracing": "7.92.0", - "@sentry/core": "7.92.0", - "@sentry/types": "7.92.0", - "@sentry/utils": "7.92.0", - "https-proxy-agent": "^5.0.0" + "@opentelemetry/api": "^1.9.0", + "@opentelemetry/context-async-hooks": "^1.25.1", + "@opentelemetry/core": "^1.25.1", + "@opentelemetry/instrumentation": "^0.52.1", + "@opentelemetry/instrumentation-connect": "0.38.0", + "@opentelemetry/instrumentation-express": "0.41.1", + "@opentelemetry/instrumentation-fastify": "0.38.0", + "@opentelemetry/instrumentation-fs": "0.14.0", + "@opentelemetry/instrumentation-graphql": "0.42.0", + "@opentelemetry/instrumentation-hapi": "0.40.0", + "@opentelemetry/instrumentation-http": "0.52.1", + "@opentelemetry/instrumentation-ioredis": "0.42.0", + "@opentelemetry/instrumentation-koa": "0.42.0", + "@opentelemetry/instrumentation-mongodb": "0.46.0", + "@opentelemetry/instrumentation-mongoose": "0.40.0", + "@opentelemetry/instrumentation-mysql": "0.40.0", + "@opentelemetry/instrumentation-mysql2": "0.40.0", + "@opentelemetry/instrumentation-nestjs-core": "0.39.0", + "@opentelemetry/instrumentation-pg": "0.43.0", + "@opentelemetry/instrumentation-redis-4": "0.41.0", + "@opentelemetry/resources": "^1.25.1", + "@opentelemetry/sdk-trace-base": "^1.25.1", + "@opentelemetry/semantic-conventions": "^1.25.1", + "@prisma/instrumentation": "5.17.0", + "@sentry/core": "8.26.0", + "@sentry/opentelemetry": "8.26.0", + "@sentry/types": "8.26.0", + "@sentry/utils": "8.26.0", + "import-in-the-middle": "^1.11.0" + }, + "engines": { + "node": ">=14.18" + }, + "optionalDependencies": { + "opentelemetry-instrumentation-fetch-node": "1.2.3" + } + }, + "node_modules/@sentry/node/node_modules/@sentry/core": { + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.26.0.tgz", + "integrity": "sha512-g/tVmTZD4GNbLFf++hKJfBpcCAtduFEMLnbfa9iT/QEZjlmP+EzY+GsH9bafM5VsNe8DiOUp+kJKWtShzlVdBA==", + "peer": true, + "dependencies": { + "@sentry/types": "8.26.0", + "@sentry/utils": "8.26.0" }, "engines": { - "node": ">=8" + "node": ">=14.18" } }, - "node_modules/@sentry/types": { - "version": "7.92.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.92.0.tgz", - "integrity": "sha512-APmSOuZuoRGpbPpPeYIbMSplPjiWNLZRQa73QiXuTflW4Tu/ItDlU8hOa2+A6JKVkJCuD2EN6yUrxDGSMyNXeg==", + "node_modules/@sentry/node/node_modules/@sentry/utils": { + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.26.0.tgz", + "integrity": "sha512-xvlPU9Hd2BlyT+FhWHGNwnxWqdVRk2AHnDtVcW4Ma0Ri5EwS+uy4Jeik5UkSv8C5RVb9VlxFmS8LN3I1MPJsLw==", "peer": true, + "dependencies": { + "@sentry/types": "8.26.0" + }, "engines": { - "node": ">=8" + "node": ">=14.18" } }, - "node_modules/@sentry/utils": { - "version": "7.92.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.92.0.tgz", - "integrity": "sha512-3nEfrQ1z28b/2zgFGANPh5yMVtgwXmrasZxTvKbrAj+KWJpjrJHrIR84r9W277J44NMeZ5RhRW2uoDmuBslPnA==", + "node_modules/@sentry/opentelemetry": { + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@sentry/opentelemetry/-/opentelemetry-8.26.0.tgz", + "integrity": "sha512-HBDheM/+ysfIz8R1OH4bBIxdgD7ZbQkKLJAUXkdAbBcfbpK/CTtwcplbauF5wY7Q+GYvwL/ShuDwvXRfW+gFyQ==", "peer": true, "dependencies": { - "@sentry/types": "7.92.0" + "@sentry/core": "8.26.0", + "@sentry/types": "8.26.0", + "@sentry/utils": "8.26.0" }, "engines": { - "node": ">=8" + "node": ">=14.18" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.9.0", + "@opentelemetry/core": "^1.25.1", + "@opentelemetry/instrumentation": "^0.52.1", + "@opentelemetry/sdk-trace-base": "^1.25.1", + "@opentelemetry/semantic-conventions": "^1.25.1" + } + }, + "node_modules/@sentry/opentelemetry/node_modules/@sentry/core": { + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.26.0.tgz", + "integrity": "sha512-g/tVmTZD4GNbLFf++hKJfBpcCAtduFEMLnbfa9iT/QEZjlmP+EzY+GsH9bafM5VsNe8DiOUp+kJKWtShzlVdBA==", + "peer": true, + "dependencies": { + "@sentry/types": "8.26.0", + "@sentry/utils": "8.26.0" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry/opentelemetry/node_modules/@sentry/utils": { + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.26.0.tgz", + "integrity": "sha512-xvlPU9Hd2BlyT+FhWHGNwnxWqdVRk2AHnDtVcW4Ma0Ri5EwS+uy4Jeik5UkSv8C5RVb9VlxFmS8LN3I1MPJsLw==", + "peer": true, + "dependencies": { + "@sentry/types": "8.26.0" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry/types": { + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.26.0.tgz", + "integrity": "sha512-zKmh6SWsJh630rpt7a9vP4Cm4m1C2gDTUqUiH565CajCL/4cePpNWYrNwalSqsOSL7B9OrczA1+n6a6XvND+ng==", + "engines": { + "node": ">=14.18" } }, "node_modules/@sinclair/typebox": { @@ -1450,6 +1985,15 @@ "@babel/types": "^7.20.7" } }, + "node_modules/@types/connect": { + "version": "3.4.36", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.36.tgz", + "integrity": "sha512-P63Zd/JUGq+PdrM1lv0Wv5SBYeA2+CORvbrXbngriYY0jzLUWfQMQQxOhjONEz/wlHOAxOdY7CY65rgQdTjq2w==", + "peer": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/cookiejar": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@types/cookiejar/-/cookiejar-2.1.5.tgz", @@ -1511,21 +2055,55 @@ "integrity": "sha512-ymXWVrDiCxTBE3+RIrrP533E70eA+9qu7zdWoHuOmGujkYtzf4HQF96b8nwHLqhuf4ykX61IGRIB38CC6/sImQ==", "dev": true }, + "node_modules/@types/mysql": { + "version": "2.15.22", + "resolved": "https://registry.npmjs.org/@types/mysql/-/mysql-2.15.22.tgz", + "integrity": "sha512-wK1pzsJVVAjYCSZWQoWHziQZbNggXFDUEIGf54g4ZM/ERuP86uGdWeKZWMYlqTPMZfHJJvLPyogXGvCOg87yLQ==", + "peer": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/node": { "version": "18.19.5", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.5.tgz", "integrity": "sha512-22MG6T02Hos2JWfa1o5jsIByn+bc5iOt1IS4xyg6OG68Bu+wMonVZzdrgCw693++rpLE9RUT/Bx15BeDzO0j+g==", - "dev": true, "dependencies": { "undici-types": "~5.26.4" } }, + "node_modules/@types/pg": { + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.6.1.tgz", + "integrity": "sha512-1Kc4oAGzAl7uqUStZCDvaLFqZrW9qWSjXOmBfdgyBP5La7Us6Mg4GBvRlSoaZMhQF/zSj1C8CtKMBkoiT8eL8w==", + "peer": true, + "dependencies": { + "@types/node": "*", + "pg-protocol": "*", + "pg-types": "^2.2.0" + } + }, + "node_modules/@types/pg-pool": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/pg-pool/-/pg-pool-2.0.4.tgz", + "integrity": "sha512-qZAvkv1K3QbmHHFYSNRYPkRjOWRLBYrL4B9c+wG0GSVGBw0NtJwPcgx/DSddeDJvRGMHCEQ4VMEVfuJ/0gZ3XQ==", + "peer": true, + "dependencies": { + "@types/pg": "*" + } + }, "node_modules/@types/prettier": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", "dev": true }, + "node_modules/@types/shimmer": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@types/shimmer/-/shimmer-1.2.0.tgz", + "integrity": "sha512-UE7oxhQLLd9gub6JKIAhDq06T0F6FnztwMNRvYgjeQSBeMc1ZG/tA47EwfduvkuQS8apbkM/lpLpWsaCeYsXVg==", + "peer": true + }, "node_modules/@types/stack-utils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", @@ -1567,10 +2145,42 @@ "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", "dev": true }, + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-import-assertions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", + "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "optional": true, + "peer": true, + "peerDependencies": { + "acorn": "^8" + } + }, + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", + "peer": true, + "peerDependencies": { + "acorn": "^8" + } + }, "node_modules/agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, "dependencies": { "debug": "4" }, @@ -1972,8 +2582,7 @@ "node_modules/cjs-module-lexer": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", - "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", - "dev": true + "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==" }, "node_modules/cliui": { "version": "8.0.1", @@ -2112,9 +2721,9 @@ } }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "dependencies": { "ms": "2.1.2" }, @@ -2450,7 +3059,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -2652,7 +3260,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", - "dev": true, "dependencies": { "function-bind": "^1.1.2" }, @@ -2693,6 +3300,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, "dependencies": { "agent-base": "6", "debug": "4" @@ -2719,6 +3327,18 @@ "minimatch": "^3.0.4" } }, + "node_modules/import-in-the-middle": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.11.0.tgz", + "integrity": "sha512-5DimNQGoe0pLUHbR9qK84iWaWjjbsxiqXnw6Qz64+azRgleqv9k2kTt5fw7QsOpmaGYtuxxursnPPsnTKEx10Q==", + "peer": true, + "dependencies": { + "acorn": "^8.8.2", + "acorn-import-attributes": "^1.9.5", + "cjs-module-lexer": "^1.2.2", + "module-details-from-path": "^1.0.3" + } + }, "node_modules/import-local": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", @@ -2783,7 +3403,6 @@ "version": "2.13.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", - "dev": true, "dependencies": { "hasown": "^2.0.0" }, @@ -3623,6 +4242,12 @@ "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", "dev": true }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "peer": true + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -3794,6 +4419,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/module-details-from-path": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.3.tgz", + "integrity": "sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A==", + "peer": true + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -3889,6 +4520,69 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/opentelemetry-instrumentation-fetch-node": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/opentelemetry-instrumentation-fetch-node/-/opentelemetry-instrumentation-fetch-node-1.2.3.tgz", + "integrity": "sha512-Qb11T7KvoCevMaSeuamcLsAD+pZnavkhDnlVL0kRozfhl42dKG5Q3anUklAFKJZjY3twLR+BnRa6DlwwkIE/+A==", + "optional": true, + "peer": true, + "dependencies": { + "@opentelemetry/instrumentation": "^0.46.0", + "@opentelemetry/semantic-conventions": "^1.17.0" + }, + "engines": { + "node": ">18.0.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.6.0" + } + }, + "node_modules/opentelemetry-instrumentation-fetch-node/node_modules/@opentelemetry/instrumentation": { + "version": "0.46.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.46.0.tgz", + "integrity": "sha512-a9TijXZZbk0vI5TGLZl+0kxyFfrXHhX6Svtz7Pp2/VBlCSKrazuULEyoJQrOknJyFWNMEmbbJgOciHCCpQcisw==", + "optional": true, + "peer": true, + "dependencies": { + "@types/shimmer": "^1.0.2", + "import-in-the-middle": "1.7.1", + "require-in-the-middle": "^7.1.1", + "semver": "^7.5.2", + "shimmer": "^1.2.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/opentelemetry-instrumentation-fetch-node/node_modules/import-in-the-middle": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.7.1.tgz", + "integrity": "sha512-1LrZPDtW+atAxH42S6288qyDFNQ2YCty+2mxEPRtfazH6Z5QwkaBSTS2ods7hnVJioF6rkRfNoA6A/MstpFXLg==", + "optional": true, + "peer": true, + "dependencies": { + "acorn": "^8.8.2", + "acorn-import-assertions": "^1.9.0", + "cjs-module-lexer": "^1.2.2", + "module-details-from-path": "^1.0.3" + } + }, + "node_modules/opentelemetry-instrumentation-fetch-node/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "optional": true, + "peer": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -3987,8 +4681,7 @@ "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/path-to-regexp": { "version": "3.2.0", @@ -3996,6 +4689,37 @@ "integrity": "sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA==", "peer": true }, + "node_modules/pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", + "peer": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/pg-protocol": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.1.tgz", + "integrity": "sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg==", + "peer": true + }, + "node_modules/pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "peer": true, + "dependencies": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -4035,6 +4759,45 @@ "node": ">=8" } }, + "node_modules/postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/postgres-bytea": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", + "integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "peer": true, + "dependencies": { + "xtend": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/prettier": { "version": "2.8.8", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", @@ -4164,11 +4927,24 @@ "node": ">=0.10.0" } }, + "node_modules/require-in-the-middle": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-7.4.0.tgz", + "integrity": "sha512-X34iHADNbNDfr6OTStIAHWSAvvKQRYgLO6duASaVf7J2VA3lvmNYboAHOuLC2huav1IwgZJtyEcJCKVzFxOSMQ==", + "peer": true, + "dependencies": { + "debug": "^4.3.5", + "module-details-from-path": "^1.0.3", + "resolve": "^1.22.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, "node_modules/resolve": { "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, "dependencies": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", @@ -4312,6 +5088,12 @@ "node": ">=8" } }, + "node_modules/shimmer": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz", + "integrity": "sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==", + "peer": true + }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -4601,7 +5383,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -4868,8 +5649,7 @@ "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" }, "node_modules/update-browserslist-db": { "version": "1.0.13", @@ -4910,11 +5690,6 @@ "fast-url-parser": "^1.1.3" } }, - "node_modules/user": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/user/-/user-0.0.0.tgz", - "integrity": "sha512-eRNM5isOvr6aEFAGi1CqAkmLkYxW2NJ5ThhbD+6IJXYKM1mo7Gtxx4mQIveHz/5K3p/SVnlW9k17ETn+QAu8IQ==" - }, "node_modules/uuid": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", @@ -5051,6 +5826,15 @@ } } }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "peer": true, + "engines": { + "node": ">=0.4" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/package.json b/package.json index 24d88fc..928b75d 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,7 @@ "peerDependencies": { "@nestjs/common": ">=10.0.0", "@nestjs/core": ">=10.0.0", - "@sentry/hub": "^7.7.0", - "@sentry/node": "^7.7.0", + "@sentry/node": "^8.26.0", "reflect-metadata": "^0.1.13", "rimraf": "^3.0.2", "rxjs": "^7.2.0" @@ -56,6 +55,7 @@ }, "devDependencies": { "@nestjs/testing": "10.3.0", + "@sentry/types": "^8.26.0", "@types/jest": "28.1.6", "@types/node": "^18.0.6", "@types/supertest": "^2.0.12",