@sentry/node 10.65.0 → 10.66.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 (84) hide show
  1. package/build/cjs/index.js +10 -8
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/integrations/tracing/dataloader/index.js +7 -2
  4. package/build/cjs/integrations/tracing/dataloader/index.js.map +1 -1
  5. package/build/cjs/integrations/tracing/graphql/vendored/utils.js +4 -2
  6. package/build/cjs/integrations/tracing/graphql/vendored/utils.js.map +1 -1
  7. package/build/cjs/integrations/tracing/index.js +2 -2
  8. package/build/cjs/integrations/tracing/index.js.map +1 -1
  9. package/build/cjs/integrations/tracing/knex/index.js +6 -1
  10. package/build/cjs/integrations/tracing/knex/index.js.map +1 -1
  11. package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js +2 -2
  12. package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -1
  13. package/build/cjs/sdk/index.js +10 -11
  14. package/build/cjs/sdk/index.js.map +1 -1
  15. package/build/esm/index.js +2 -1
  16. package/build/esm/index.js.map +1 -1
  17. package/build/esm/integrations/tracing/dataloader/index.js +7 -2
  18. package/build/esm/integrations/tracing/dataloader/index.js.map +1 -1
  19. package/build/esm/integrations/tracing/graphql/vendored/utils.js +5 -3
  20. package/build/esm/integrations/tracing/graphql/vendored/utils.js.map +1 -1
  21. package/build/esm/integrations/tracing/index.js +1 -1
  22. package/build/esm/integrations/tracing/index.js.map +1 -1
  23. package/build/esm/integrations/tracing/knex/index.js +6 -1
  24. package/build/esm/integrations/tracing/knex/index.js.map +1 -1
  25. package/build/esm/package.json +1 -1
  26. package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js +2 -2
  27. package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -1
  28. package/build/esm/sdk/index.js +10 -11
  29. package/build/esm/sdk/index.js.map +1 -1
  30. package/build/types/index.d.ts +2 -1
  31. package/build/types/index.d.ts.map +1 -1
  32. package/build/types/integrations/tracing/dataloader/index.d.ts.map +1 -1
  33. package/build/types/integrations/tracing/graphql/vendored/utils.d.ts.map +1 -1
  34. package/build/types/integrations/tracing/knex/index.d.ts.map +1 -1
  35. package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +2 -1
  36. package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts.map +1 -1
  37. package/build/types/sdk/index.d.ts.map +1 -1
  38. package/build/types-ts3.8/index.d.ts +2 -1
  39. package/build/types-ts3.8/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +2 -1
  40. package/package.json +6 -6
  41. package/build/cjs/integrations/tracing/prisma/index.js +0 -109
  42. package/build/cjs/integrations/tracing/prisma/index.js.map +0 -1
  43. package/build/cjs/integrations/tracing/prisma/vendored/active-tracing-helper.js +0 -145
  44. package/build/cjs/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +0 -1
  45. package/build/cjs/integrations/tracing/prisma/vendored/constants.js +0 -14
  46. package/build/cjs/integrations/tracing/prisma/vendored/constants.js.map +0 -1
  47. package/build/cjs/integrations/tracing/prisma/vendored/global.js +0 -28
  48. package/build/cjs/integrations/tracing/prisma/vendored/global.js.map +0 -1
  49. package/build/cjs/integrations/tracing/prisma/vendored/instrumentation.js +0 -33
  50. package/build/cjs/integrations/tracing/prisma/vendored/instrumentation.js.map +0 -1
  51. package/build/esm/integrations/tracing/prisma/index.js +0 -106
  52. package/build/esm/integrations/tracing/prisma/index.js.map +0 -1
  53. package/build/esm/integrations/tracing/prisma/vendored/active-tracing-helper.js +0 -143
  54. package/build/esm/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +0 -1
  55. package/build/esm/integrations/tracing/prisma/vendored/constants.js +0 -9
  56. package/build/esm/integrations/tracing/prisma/vendored/constants.js.map +0 -1
  57. package/build/esm/integrations/tracing/prisma/vendored/global.js +0 -24
  58. package/build/esm/integrations/tracing/prisma/vendored/global.js.map +0 -1
  59. package/build/esm/integrations/tracing/prisma/vendored/instrumentation.js +0 -31
  60. package/build/esm/integrations/tracing/prisma/vendored/instrumentation.js.map +0 -1
  61. package/build/types/integrations/tracing/prisma/index.d.ts +0 -34
  62. package/build/types/integrations/tracing/prisma/index.d.ts.map +0 -1
  63. package/build/types/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts +0 -16
  64. package/build/types/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts.map +0 -1
  65. package/build/types/integrations/tracing/prisma/vendored/constants.d.ts +0 -5
  66. package/build/types/integrations/tracing/prisma/vendored/constants.d.ts.map +0 -1
  67. package/build/types/integrations/tracing/prisma/vendored/global.d.ts +0 -5
  68. package/build/types/integrations/tracing/prisma/vendored/global.d.ts.map +0 -1
  69. package/build/types/integrations/tracing/prisma/vendored/instrumentation.d.ts +0 -15
  70. package/build/types/integrations/tracing/prisma/vendored/instrumentation.d.ts.map +0 -1
  71. package/build/types/integrations/tracing/prisma/vendored/types.d.ts +0 -34
  72. package/build/types/integrations/tracing/prisma/vendored/types.d.ts.map +0 -1
  73. package/build/types/integrations/tracing/prisma/vendored/v5-tracing-helper.d.ts +0 -38
  74. package/build/types/integrations/tracing/prisma/vendored/v5-tracing-helper.d.ts.map +0 -1
  75. package/build/types/integrations/tracing/prisma/vendored/v6-tracing-helper.d.ts +0 -31
  76. package/build/types/integrations/tracing/prisma/vendored/v6-tracing-helper.d.ts.map +0 -1
  77. package/build/types-ts3.8/integrations/tracing/prisma/index.d.ts +0 -34
  78. package/build/types-ts3.8/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts +0 -16
  79. package/build/types-ts3.8/integrations/tracing/prisma/vendored/constants.d.ts +0 -5
  80. package/build/types-ts3.8/integrations/tracing/prisma/vendored/global.d.ts +0 -5
  81. package/build/types-ts3.8/integrations/tracing/prisma/vendored/instrumentation.d.ts +0 -15
  82. package/build/types-ts3.8/integrations/tracing/prisma/vendored/types.d.ts +0 -37
  83. package/build/types-ts3.8/integrations/tracing/prisma/vendored/v5-tracing-helper.d.ts +0 -44
  84. package/build/types-ts3.8/integrations/tracing/prisma/vendored/v6-tracing-helper.d.ts +0 -34
@@ -1,31 +0,0 @@
1
- import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
2
- import { ActiveTracingHelper } from './active-tracing-helper.js';
3
- import { NAME, VERSION, MODULE_NAME, SUPPORTED_MODULE_VERSIONS } from './constants.js';
4
- import { setGlobalTracingHelper, clearGlobalTracingHelper, getGlobalTracingHelper } from './global.js';
5
-
6
- class PrismaInstrumentation extends InstrumentationBase {
7
- constructor(config = {}) {
8
- super(NAME, VERSION, config);
9
- }
10
- init() {
11
- const module = new InstrumentationNodeModuleDefinition(MODULE_NAME, SUPPORTED_MODULE_VERSIONS);
12
- return [module];
13
- }
14
- enable() {
15
- const config = this._config;
16
- setGlobalTracingHelper(
17
- new ActiveTracingHelper({
18
- ignoreSpanTypes: config.ignoreSpanTypes ?? []
19
- })
20
- );
21
- }
22
- disable() {
23
- clearGlobalTracingHelper();
24
- }
25
- isEnabled() {
26
- return getGlobalTracingHelper() !== void 0;
27
- }
28
- }
29
-
30
- export { PrismaInstrumentation };
31
- //# sourceMappingURL=instrumentation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"instrumentation.js","sources":["../../../../../../src/integrations/tracing/prisma/vendored/instrumentation.ts"],"sourcesContent":["/*\n * Copyright Prisma\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/prisma/prisma/tree/b6feea5565ec577545a79547d24273ccdd11b4c7/packages/instrumentation\n * - Upstream version: @prisma/instrumentation@7.8.0\n * - Replaced `@prisma/instrumentation-contract` imports with local vendored equivalents\n * - Replaced `import { VERSION, NAME, MODULE_NAME } from './constants'` with local vendored constants\n * - Removed the unused `setTracerProvider`/`tracerProvider` members; spans are created through Sentry's\n * span APIs, which resolve the active client themselves\n */\n\nimport type { InstrumentationConfig } from '@opentelemetry/instrumentation';\nimport { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';\nimport { ActiveTracingHelper } from './active-tracing-helper';\nimport { MODULE_NAME, NAME, SUPPORTED_MODULE_VERSIONS, VERSION } from './constants';\nimport { clearGlobalTracingHelper, getGlobalTracingHelper, setGlobalTracingHelper } from './global';\n\nexport interface PrismaInstrumentationConfig {\n ignoreSpanTypes?: (string | RegExp)[];\n}\n\ntype Config = PrismaInstrumentationConfig & InstrumentationConfig;\n\nexport class PrismaInstrumentation extends InstrumentationBase {\n public constructor(config: Config = {}) {\n super(NAME, VERSION, config);\n }\n\n public init(): InstrumentationNodeModuleDefinition[] {\n const module = new InstrumentationNodeModuleDefinition(MODULE_NAME, SUPPORTED_MODULE_VERSIONS);\n\n return [module];\n }\n\n public enable(): void {\n const config = this._config as Config;\n\n setGlobalTracingHelper(\n new ActiveTracingHelper({\n ignoreSpanTypes: config.ignoreSpanTypes ?? [],\n }),\n );\n }\n\n public disable(): void {\n clearGlobalTracingHelper();\n }\n\n public isEnabled(): boolean {\n return getGlobalTracingHelper() !== undefined;\n }\n}\n"],"names":[],"mappings":";;;;;AAyBO,MAAM,8BAA8B,mBAAA,CAAoB;AAAA,EACtD,WAAA,CAAY,MAAA,GAAiB,EAAC,EAAG;AACtC,IAAA,KAAA,CAAM,IAAA,EAAM,SAAS,MAAM,CAAA;AAAA,EAC7B;AAAA,EAEO,IAAA,GAA8C;AACnD,IAAA,MAAM,MAAA,GAAS,IAAI,mCAAA,CAAoC,WAAA,EAAa,yBAAyB,CAAA;AAE7F,IAAA,OAAO,CAAC,MAAM,CAAA;AAAA,EAChB;AAAA,EAEO,MAAA,GAAe;AACpB,IAAA,MAAM,SAAS,IAAA,CAAK,OAAA;AAEpB,IAAA,sBAAA;AAAA,MACE,IAAI,mBAAA,CAAoB;AAAA,QACtB,eAAA,EAAiB,MAAA,CAAO,eAAA,IAAmB;AAAC,OAC7C;AAAA,KACH;AAAA,EACF;AAAA,EAEO,OAAA,GAAgB;AACrB,IAAA,wBAAA,EAAyB;AAAA,EAC3B;AAAA,EAEO,SAAA,GAAqB;AAC1B,IAAA,OAAO,wBAAuB,KAAM,MAAA;AAAA,EACtC;AACF;;;;"}
@@ -1,34 +0,0 @@
1
- import type { Instrumentation } from '@opentelemetry/instrumentation';
2
- import { PrismaInstrumentation } from './vendored/instrumentation';
3
- interface PrismaOptions {
4
- /**
5
- * @deprecated This is no longer used, v5 works out of the box.
6
- */
7
- prismaInstrumentation?: Instrumentation;
8
- /**
9
- * Configuration passed through to the {@link PrismaInstrumentation} constructor.
10
- */
11
- instrumentationConfig?: ConstructorParameters<typeof PrismaInstrumentation>[0];
12
- }
13
- export declare const instrumentPrisma: ((options?: PrismaOptions | undefined) => Instrumentation<import("@opentelemetry/instrumentation").InstrumentationConfig>) & {
14
- id: string;
15
- };
16
- /**
17
- * Adds Sentry tracing instrumentation for the [prisma](https://www.npmjs.com/package/prisma) library.
18
- * For more information, see the [`prismaIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/prisma/).
19
- *
20
- * NOTE: This integration works out of the box with Prisma v6, and v7.
21
- * On Prisma versions prior to v6, add `previewFeatures = ["tracing"]` to the client generator block of your Prisma schema:
22
- *
23
- * ```
24
- * generator client {
25
- * provider = "prisma-client-js"
26
- * previewFeatures = ["tracing"]
27
- * }
28
- * ```
29
- */
30
- export declare const prismaIntegration: (options?: PrismaOptions | undefined) => import("@sentry/core").Integration & {
31
- name: "Prisma";
32
- };
33
- export {};
34
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/prisma/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAatE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AA8GnE,UAAU,aAAa;IACrB;;OAEG;IACH,qBAAqB,CAAC,EAAE,eAAe,CAAC;IACxC;;OAEG;IACH,qBAAqB,CAAC,EAAE,qBAAqB,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC;CAChF;AAqCD,eAAO,MAAM,gBAAgB;;CAE3B,CAAC;AAEH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB;;CAgD5B,CAAC"}
@@ -1,16 +0,0 @@
1
- import type { Span } from '@sentry/core';
2
- import type { EngineSpan, ExtendedSpanOptions, SpanCallback, TracingHelper } from './types';
3
- type Options = {
4
- ignoreSpanTypes: (string | RegExp)[];
5
- };
6
- export declare class ActiveTracingHelper implements TracingHelper {
7
- private ignoreSpanTypes;
8
- constructor({ ignoreSpanTypes }: Options);
9
- isEnabled(): boolean;
10
- getTraceParent(span?: Span): string;
11
- dispatchEngineSpans(spans: EngineSpan[]): void;
12
- getActiveContext(): Span | undefined;
13
- runInChildSpan<R>(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback<R>): R;
14
- }
15
- export {};
16
- //# sourceMappingURL=active-tracing-helper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"active-tracing-helper.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/prisma/vendored/active-tracing-helper.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,IAAI,EAA2C,MAAM,cAAc,CAAC;AAQlF,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAQ5F,KAAK,OAAO,GAAG;IACb,eAAe,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CACtC,CAAC;AA8BF,qBAAa,mBAAoB,YAAW,aAAa;IACvD,OAAO,CAAC,eAAe,CAAsB;gBAE1B,EAAE,eAAe,EAAE,EAAE,OAAO;IAIxC,SAAS,IAAI,OAAO;IAIpB,cAAc,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM;IAQnC,mBAAmB,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI;IAS9C,gBAAgB,IAAI,IAAI,GAAG,SAAS;IAIpC,cAAc,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,GAAG,mBAAmB,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC;CAgCpG"}
@@ -1,5 +0,0 @@
1
- export declare const VERSION: string;
2
- export declare const NAME = "@sentry/instrumentation-prisma";
3
- export declare const MODULE_NAME = "@prisma/client";
4
- export declare const SUPPORTED_MODULE_VERSIONS: string[];
5
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/prisma/vendored/constants.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,OAAO,QAAc,CAAC;AAEnC,eAAO,MAAM,IAAI,mCAAmC,CAAC;AAErD,eAAO,MAAM,WAAW,mBAAmB,CAAC;AAE5C,eAAO,MAAM,yBAAyB,UAAc,CAAC"}
@@ -1,5 +0,0 @@
1
- import type { TracingHelper } from './types';
2
- export declare function getGlobalTracingHelper(): TracingHelper | undefined;
3
- export declare function setGlobalTracingHelper(helper: TracingHelper): void;
4
- export declare function clearGlobalTracingHelper(): void;
5
- //# sourceMappingURL=global.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/prisma/vendored/global.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAoC,aAAa,EAAE,MAAM,SAAS,CAAC;AAe/E,wBAAgB,sBAAsB,IAAI,aAAa,GAAG,SAAS,CAUlE;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAKlE;AAED,wBAAgB,wBAAwB,IAAI,IAAI,CAG/C"}
@@ -1,15 +0,0 @@
1
- import type { InstrumentationConfig } from '@opentelemetry/instrumentation';
2
- import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
3
- export interface PrismaInstrumentationConfig {
4
- ignoreSpanTypes?: (string | RegExp)[];
5
- }
6
- type Config = PrismaInstrumentationConfig & InstrumentationConfig;
7
- export declare class PrismaInstrumentation extends InstrumentationBase {
8
- constructor(config?: Config);
9
- init(): InstrumentationNodeModuleDefinition[];
10
- enable(): void;
11
- disable(): void;
12
- isEnabled(): boolean;
13
- }
14
- export {};
15
- //# sourceMappingURL=instrumentation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/prisma/vendored/instrumentation.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,mCAAmC,EAAE,MAAM,gCAAgC,CAAC;AAK1G,MAAM,WAAW,2BAA2B;IAC1C,eAAe,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CACvC;AAED,KAAK,MAAM,GAAG,2BAA2B,GAAG,qBAAqB,CAAC;AAElE,qBAAa,qBAAsB,SAAQ,mBAAmB;gBACzC,MAAM,GAAE,MAAW;IAI/B,IAAI,IAAI,mCAAmC,EAAE;IAM7C,MAAM,IAAI,IAAI;IAUd,OAAO,IAAI,IAAI;IAIf,SAAS,IAAI,OAAO;CAG5B"}
@@ -1,34 +0,0 @@
1
- import type { SpanOptions } from '@opentelemetry/api';
2
- import type { Span } from '@sentry/core';
3
- export type SpanCallback<R> = (span?: Span, parentSpan?: Span) => R;
4
- export interface ExtendedSpanOptions extends SpanOptions {
5
- /** The name of the span */
6
- name: string;
7
- internal?: boolean;
8
- /** Whether it propagates context (?=true) */
9
- active?: boolean;
10
- }
11
- export type EngineSpanId = string;
12
- export type HrTime = [number, number];
13
- export type EngineSpanKind = 'client' | 'internal';
14
- export type EngineSpan = {
15
- id: EngineSpanId;
16
- parentId: string | null;
17
- name: string;
18
- startTime: HrTime;
19
- endTime: HrTime;
20
- kind: EngineSpanKind;
21
- attributes?: Record<string, unknown>;
22
- links?: EngineSpanId[];
23
- };
24
- export interface TracingHelper {
25
- isEnabled(): boolean;
26
- getTraceParent(span?: Span): string;
27
- dispatchEngineSpans(spans: EngineSpan[]): void;
28
- getActiveContext(): Span | undefined;
29
- runInChildSpan<R>(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback<R>): R;
30
- }
31
- export interface PrismaInstrumentationGlobalValue {
32
- helper?: TracingHelper;
33
- }
34
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/prisma/vendored/types.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,CAAC,EAAE,IAAI,KAAK,CAAC,CAAC;AAEpE,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACtD,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;IAEb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC,MAAM,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEtC,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEnD,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,YAAY,CAAC;IACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,cAAc,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,SAAS,IAAI,OAAO,CAAC;IACrB,cAAc,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACpC,mBAAmB,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAC/C,gBAAgB,IAAI,IAAI,GAAG,SAAS,CAAC;IACrC,cAAc,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,GAAG,mBAAmB,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAC9F;AAED,MAAM,WAAW,gCAAgC;IAC/C,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB"}
@@ -1,38 +0,0 @@
1
- import type { Context, Span, SpanOptions } from '@opentelemetry/api';
2
- type V5SpanCallback<R> = (span?: Span, context?: Context) => R;
3
- type V5ExtendedSpanOptions = SpanOptions & {
4
- name: string;
5
- internal?: boolean;
6
- middleware?: boolean;
7
- active?: boolean;
8
- context?: Context;
9
- };
10
- type EngineSpanEvent = {
11
- span: boolean;
12
- spans: V5EngineSpan[];
13
- };
14
- type V5EngineSpanKind = 'client' | 'internal';
15
- type V5EngineSpan = {
16
- span: boolean;
17
- name: string;
18
- trace_id: string;
19
- span_id: string;
20
- parent_span_id: string;
21
- start_time: [number, number];
22
- end_time: [number, number];
23
- attributes?: Record<string, string>;
24
- links?: {
25
- trace_id: string;
26
- span_id: string;
27
- }[];
28
- kind: V5EngineSpanKind;
29
- };
30
- export interface PrismaV5TracingHelper {
31
- isEnabled(): boolean;
32
- getTraceParent(context?: Context): string;
33
- createEngineSpan(engineSpanEvent: EngineSpanEvent): void;
34
- getActiveContext(): Context | undefined;
35
- runInChildSpan<R>(nameOrOptions: string | V5ExtendedSpanOptions, callback: V5SpanCallback<R>): R;
36
- }
37
- export {};
38
- //# sourceMappingURL=v5-tracing-helper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"v5-tracing-helper.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/prisma/vendored/v5-tracing-helper.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAErE,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC,CAAC;AAE/D,KAAK,qBAAqB,GAAG,WAAW,GAAG;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB,CAAC;AAEF,KAAK,gBAAgB,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE9C,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,KAAK,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAChD,IAAI,EAAE,gBAAgB,CAAC;CACxB,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC,SAAS,IAAI,OAAO,CAAC;IACrB,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1C,gBAAgB,CAAC,eAAe,EAAE,eAAe,GAAG,IAAI,CAAC;IACzD,gBAAgB,IAAI,OAAO,GAAG,SAAS,CAAC;IACxC,cAAc,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,GAAG,qBAAqB,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAClG"}
@@ -1,31 +0,0 @@
1
- import type { Context, Span, SpanOptions } from '@opentelemetry/api';
2
- type V6SpanCallback<R> = (span?: Span, context?: Context) => R;
3
- type V6ExtendedSpanOptions = SpanOptions & {
4
- name: string;
5
- internal?: boolean;
6
- middleware?: boolean;
7
- active?: boolean;
8
- context?: Context;
9
- };
10
- type V6EngineSpanId = string;
11
- type V6HrTime = [number, number];
12
- type EngineSpanKind = 'client' | 'internal';
13
- type PrismaV6EngineSpan = {
14
- id: V6EngineSpanId;
15
- parentId: string | null;
16
- name: string;
17
- startTime: V6HrTime;
18
- endTime: V6HrTime;
19
- kind: EngineSpanKind;
20
- attributes?: Record<string, unknown>;
21
- links?: V6EngineSpanId[];
22
- };
23
- export interface PrismaV6TracingHelper {
24
- isEnabled(): boolean;
25
- getTraceParent(context?: Context): string;
26
- dispatchEngineSpans(spans: PrismaV6EngineSpan[]): void;
27
- getActiveContext(): Context | undefined;
28
- runInChildSpan<R>(nameOrOptions: string | V6ExtendedSpanOptions, callback: V6SpanCallback<R>): R;
29
- }
30
- export {};
31
- //# sourceMappingURL=v6-tracing-helper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"v6-tracing-helper.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/tracing/prisma/vendored/v6-tracing-helper.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAErE,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC,CAAC;AAE/D,KAAK,qBAAqB,GAAG,WAAW,GAAG;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,KAAK,cAAc,GAAG,MAAM,CAAC;AAE7B,KAAK,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEjC,KAAK,cAAc,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE5C,KAAK,kBAAkB,GAAG;IACxB,EAAE,EAAE,cAAc,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,QAAQ,CAAC;IACpB,OAAO,EAAE,QAAQ,CAAC;IAClB,IAAI,EAAE,cAAc,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC,SAAS,IAAI,OAAO,CAAC;IACrB,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1C,mBAAmB,CAAC,KAAK,EAAE,kBAAkB,EAAE,GAAG,IAAI,CAAC;IACvD,gBAAgB,IAAI,OAAO,GAAG,SAAS,CAAC;IACxC,cAAc,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,GAAG,qBAAqB,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAClG"}
@@ -1,34 +0,0 @@
1
- import { Instrumentation } from '@opentelemetry/instrumentation';
2
- import { PrismaInstrumentation } from './vendored/instrumentation';
3
- interface PrismaOptions {
4
- /**
5
- * @deprecated This is no longer used, v5 works out of the box.
6
- */
7
- prismaInstrumentation?: Instrumentation;
8
- /**
9
- * Configuration passed through to the {@link PrismaInstrumentation} constructor.
10
- */
11
- instrumentationConfig?: ConstructorParameters<typeof PrismaInstrumentation>[0];
12
- }
13
- export declare const instrumentPrisma: ((options?: PrismaOptions | undefined) => Instrumentation<import("@opentelemetry/instrumentation").InstrumentationConfig>) & {
14
- id: string;
15
- };
16
- /**
17
- * Adds Sentry tracing instrumentation for the [prisma](https://www.npmjs.com/package/prisma) library.
18
- * For more information, see the [`prismaIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/prisma/).
19
- *
20
- * NOTE: This integration works out of the box with Prisma v6, and v7.
21
- * On Prisma versions prior to v6, add `previewFeatures = ["tracing"]` to the client generator block of your Prisma schema:
22
- *
23
- * ```
24
- * generator client {
25
- * provider = "prisma-client-js"
26
- * previewFeatures = ["tracing"]
27
- * }
28
- * ```
29
- */
30
- export declare const prismaIntegration: (options?: PrismaOptions | undefined) => import("@sentry/core").Integration & {
31
- name: "Prisma";
32
- };
33
- export {};
34
- //# sourceMappingURL=index.d.ts.map
@@ -1,16 +0,0 @@
1
- import { Span } from '@sentry/core';
2
- import { EngineSpan, ExtendedSpanOptions, SpanCallback, TracingHelper } from './types';
3
- type Options = {
4
- ignoreSpanTypes: (string | RegExp)[];
5
- };
6
- export declare class ActiveTracingHelper implements TracingHelper {
7
- private ignoreSpanTypes;
8
- constructor({ ignoreSpanTypes }: Options);
9
- isEnabled(): boolean;
10
- getTraceParent(span?: Span): string;
11
- dispatchEngineSpans(spans: EngineSpan[]): void;
12
- getActiveContext(): Span | undefined;
13
- runInChildSpan<R>(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback<R>): R;
14
- }
15
- export {};
16
- //# sourceMappingURL=active-tracing-helper.d.ts.map
@@ -1,5 +0,0 @@
1
- export declare const VERSION: string;
2
- export declare const NAME = "@sentry/instrumentation-prisma";
3
- export declare const MODULE_NAME = "@prisma/client";
4
- export declare const SUPPORTED_MODULE_VERSIONS: string[];
5
- //# sourceMappingURL=constants.d.ts.map
@@ -1,5 +0,0 @@
1
- import { TracingHelper } from './types';
2
- export declare function getGlobalTracingHelper(): TracingHelper | undefined;
3
- export declare function setGlobalTracingHelper(helper: TracingHelper): void;
4
- export declare function clearGlobalTracingHelper(): void;
5
- //# sourceMappingURL=global.d.ts.map
@@ -1,15 +0,0 @@
1
- import { InstrumentationConfig } from '@opentelemetry/instrumentation';
2
- import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
3
- export interface PrismaInstrumentationConfig {
4
- ignoreSpanTypes?: (string | RegExp)[];
5
- }
6
- type Config = PrismaInstrumentationConfig & InstrumentationConfig;
7
- export declare class PrismaInstrumentation extends InstrumentationBase {
8
- constructor(config?: Config);
9
- init(): InstrumentationNodeModuleDefinition[];
10
- enable(): void;
11
- disable(): void;
12
- isEnabled(): boolean;
13
- }
14
- export {};
15
- //# sourceMappingURL=instrumentation.d.ts.map
@@ -1,37 +0,0 @@
1
- import { SpanOptions } from '@opentelemetry/api';
2
- import { Span } from '@sentry/core';
3
- export type SpanCallback<R> = (span?: Span, parentSpan?: Span) => R;
4
- export interface ExtendedSpanOptions extends SpanOptions {
5
- /** The name of the span */
6
- name: string;
7
- internal?: boolean;
8
- /** Whether it propagates context (?=true) */
9
- active?: boolean;
10
- }
11
- export type EngineSpanId = string;
12
- export type HrTime = [
13
- number,
14
- number
15
- ];
16
- export type EngineSpanKind = 'client' | 'internal';
17
- export type EngineSpan = {
18
- id: EngineSpanId;
19
- parentId: string | null;
20
- name: string;
21
- startTime: HrTime;
22
- endTime: HrTime;
23
- kind: EngineSpanKind;
24
- attributes?: Record<string, unknown>;
25
- links?: EngineSpanId[];
26
- };
27
- export interface TracingHelper {
28
- isEnabled(): boolean;
29
- getTraceParent(span?: Span): string;
30
- dispatchEngineSpans(spans: EngineSpan[]): void;
31
- getActiveContext(): Span | undefined;
32
- runInChildSpan<R>(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback<R>): R;
33
- }
34
- export interface PrismaInstrumentationGlobalValue {
35
- helper?: TracingHelper;
36
- }
37
- //# sourceMappingURL=types.d.ts.map
@@ -1,44 +0,0 @@
1
- import { Context, Span, SpanOptions } from '@opentelemetry/api';
2
- type V5SpanCallback<R> = (span?: Span, context?: Context) => R;
3
- type V5ExtendedSpanOptions = SpanOptions & {
4
- name: string;
5
- internal?: boolean;
6
- middleware?: boolean;
7
- active?: boolean;
8
- context?: Context;
9
- };
10
- type EngineSpanEvent = {
11
- span: boolean;
12
- spans: V5EngineSpan[];
13
- };
14
- type V5EngineSpanKind = 'client' | 'internal';
15
- type V5EngineSpan = {
16
- span: boolean;
17
- name: string;
18
- trace_id: string;
19
- span_id: string;
20
- parent_span_id: string;
21
- start_time: [
22
- number,
23
- number
24
- ];
25
- end_time: [
26
- number,
27
- number
28
- ];
29
- attributes?: Record<string, string>;
30
- links?: {
31
- trace_id: string;
32
- span_id: string;
33
- }[];
34
- kind: V5EngineSpanKind;
35
- };
36
- export interface PrismaV5TracingHelper {
37
- isEnabled(): boolean;
38
- getTraceParent(context?: Context): string;
39
- createEngineSpan(engineSpanEvent: EngineSpanEvent): void;
40
- getActiveContext(): Context | undefined;
41
- runInChildSpan<R>(nameOrOptions: string | V5ExtendedSpanOptions, callback: V5SpanCallback<R>): R;
42
- }
43
- export {};
44
- //# sourceMappingURL=v5-tracing-helper.d.ts.map
@@ -1,34 +0,0 @@
1
- import { Context, Span, SpanOptions } from '@opentelemetry/api';
2
- type V6SpanCallback<R> = (span?: Span, context?: Context) => R;
3
- type V6ExtendedSpanOptions = SpanOptions & {
4
- name: string;
5
- internal?: boolean;
6
- middleware?: boolean;
7
- active?: boolean;
8
- context?: Context;
9
- };
10
- type V6EngineSpanId = string;
11
- type V6HrTime = [
12
- number,
13
- number
14
- ];
15
- type EngineSpanKind = 'client' | 'internal';
16
- type PrismaV6EngineSpan = {
17
- id: V6EngineSpanId;
18
- parentId: string | null;
19
- name: string;
20
- startTime: V6HrTime;
21
- endTime: V6HrTime;
22
- kind: EngineSpanKind;
23
- attributes?: Record<string, unknown>;
24
- links?: V6EngineSpanId[];
25
- };
26
- export interface PrismaV6TracingHelper {
27
- isEnabled(): boolean;
28
- getTraceParent(context?: Context): string;
29
- dispatchEngineSpans(spans: PrismaV6EngineSpan[]): void;
30
- getActiveContext(): Context | undefined;
31
- runInChildSpan<R>(nameOrOptions: string | V6ExtendedSpanOptions, callback: V6SpanCallback<R>): R;
32
- }
33
- export {};
34
- //# sourceMappingURL=v6-tracing-helper.d.ts.map