@prisma/instrumentation 6.3.0-integration-simpler-typeinfo-query.1 → 6.3.0-integration-studio-ux-refinements.1

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.
package/README.md CHANGED
@@ -29,7 +29,6 @@ Don't forget to set `previewFeatures`:
29
29
  ```prisma
30
30
  generator client {
31
31
  provider = "prisma-client-js"
32
- previewFeatures = ["tracing"]
33
32
  }
34
33
  ```
35
34
 
@@ -1,14 +1,16 @@
1
- import { Context } from '@opentelemetry/api';
2
- import { EngineSpanEvent, ExtendedSpanOptions, SpanCallback, TracingHelper } from '@prisma/internals';
1
+ import { Context, TracerProvider } from '@opentelemetry/api';
2
+ import { EngineSpan, ExtendedSpanOptions, SpanCallback, TracingHelper } from '@prisma/internals';
3
3
  type Options = {
4
4
  traceMiddleware: boolean;
5
+ tracerProvider: TracerProvider;
5
6
  };
6
7
  export declare class ActiveTracingHelper implements TracingHelper {
7
- private traceMiddleware;
8
- constructor({ traceMiddleware }: Options);
8
+ traceMiddleware: boolean;
9
+ tracerProvider: TracerProvider;
10
+ constructor({ traceMiddleware, tracerProvider }: Options);
9
11
  isEnabled(): boolean;
10
12
  getTraceParent(context?: Context | undefined): string;
11
- createEngineSpan(engineSpanEvent: EngineSpanEvent): void;
13
+ dispatchEngineSpans(spans: EngineSpan[]): void;
12
14
  getActiveContext(): Context | undefined;
13
15
  runInChildSpan<R>(options: string | ExtendedSpanOptions, callback: SpanCallback<R>): R;
14
16
  }
@@ -18,8 +18,8 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var ActiveTracingHelper_exports = {};
20
20
  __export(ActiveTracingHelper_exports, {
21
- ActiveTracingHelper: () => import_chunk_O7OBHTYQ.ActiveTracingHelper
21
+ ActiveTracingHelper: () => import_chunk_TUF6OX4N.ActiveTracingHelper
22
22
  });
23
23
  module.exports = __toCommonJS(ActiveTracingHelper_exports);
24
- var import_chunk_O7OBHTYQ = require("./chunk-O7OBHTYQ.js");
24
+ var import_chunk_TUF6OX4N = require("./chunk-TUF6OX4N.js");
25
25
  var import_chunk_FTA5RKYX = require("./chunk-FTA5RKYX.js");
@@ -1,10 +1,13 @@
1
+ import { TracerProvider } from '@opentelemetry/api';
1
2
  import { InstrumentationBase, InstrumentationConfig, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
2
3
  export interface PrismaInstrumentationConfig {
3
4
  middleware?: boolean;
4
5
  }
5
6
  type Config = PrismaInstrumentationConfig & InstrumentationConfig;
6
7
  export declare class PrismaInstrumentation extends InstrumentationBase {
8
+ private tracerProvider;
7
9
  constructor(config?: Config);
10
+ setTracerProvider(tracerProvider: TracerProvider): void;
8
11
  init(): InstrumentationNodeModuleDefinition[];
9
12
  enable(): void;
10
13
  disable(): void;
@@ -18,10 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var PrismaInstrumentation_exports = {};
20
20
  __export(PrismaInstrumentation_exports, {
21
- PrismaInstrumentation: () => import_chunk_NCD3XYIR.PrismaInstrumentation
21
+ PrismaInstrumentation: () => import_chunk_3PMLWSI7.PrismaInstrumentation
22
22
  });
23
23
  module.exports = __toCommonJS(PrismaInstrumentation_exports);
24
- var import_chunk_NCD3XYIR = require("./chunk-NCD3XYIR.js");
25
- var import_chunk_O7OBHTYQ = require("./chunk-O7OBHTYQ.js");
26
- var import_chunk_Q46VXSDK = require("./chunk-Q46VXSDK.js");
24
+ var import_chunk_3PMLWSI7 = require("./chunk-3PMLWSI7.js");
25
+ var import_chunk_TUF6OX4N = require("./chunk-TUF6OX4N.js");
26
+ var import_chunk_E5Y3EHPM = require("./chunk-E5Y3EHPM.js");
27
27
  var import_chunk_FTA5RKYX = require("./chunk-FTA5RKYX.js");
@@ -16,14 +16,14 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_KSVJP65B_exports = {};
20
- __export(chunk_KSVJP65B_exports, {
19
+ var chunk_2ZWIQFM7_exports = {};
20
+ __export(chunk_2ZWIQFM7_exports, {
21
21
  GLOBAL_KEY: () => GLOBAL_KEY,
22
22
  MODULE_NAME: () => MODULE_NAME,
23
23
  NAME: () => NAME,
24
24
  VERSION: () => VERSION
25
25
  });
26
- module.exports = __toCommonJS(chunk_KSVJP65B_exports);
26
+ module.exports = __toCommonJS(chunk_2ZWIQFM7_exports);
27
27
  var import_chunk_FTA5RKYX = require("./chunk-FTA5RKYX.js");
28
28
  var require_package = (0, import_chunk_FTA5RKYX.__commonJS)({
29
29
  "package.json"(exports, module2) {
@@ -43,17 +43,19 @@ var require_package = (0, import_chunk_FTA5RKYX.__commonJS)({
43
43
  bugs: "https://github.com/prisma/prisma/issues",
44
44
  devDependencies: {
45
45
  "@prisma/internals": "workspace:*",
46
- "@swc/core": "1.6.13",
47
- "@types/jest": "29.5.12",
46
+ "@swc/core": "1.10.1",
47
+ "@types/jest": "29.5.14",
48
48
  "@types/node": "18.19.31",
49
+ "@opentelemetry/api": "1.9.0",
49
50
  jest: "29.7.0",
50
51
  "jest-junit": "16.0.0",
51
52
  typescript: "5.4.5"
52
53
  },
53
54
  dependencies: {
54
- "@opentelemetry/api": "^1.8",
55
- "@opentelemetry/instrumentation": "^0.49 || ^0.50 || ^0.51 || ^0.52.0 || ^0.53.0",
56
- "@opentelemetry/sdk-trace-base": "^1.22"
55
+ "@opentelemetry/instrumentation": "^0.52.0 || ^0.53.0 || ^0.54.0 || ^0.55.0 || ^0.56.0 || ^0.57.0"
56
+ },
57
+ peerDependencies: {
58
+ "@opentelemetry/api": "^1.8"
57
59
  },
58
60
  files: [
59
61
  "dist"
@@ -78,4 +80,4 @@ var { version, name } = require_package();
78
80
  var GLOBAL_KEY = "PRISMA_INSTRUMENTATION";
79
81
  var VERSION = version;
80
82
  var NAME = name;
81
- var MODULE_NAME = "prisma";
83
+ var MODULE_NAME = "@prisma/client";
@@ -16,33 +16,40 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_NCD3XYIR_exports = {};
20
- __export(chunk_NCD3XYIR_exports, {
19
+ var chunk_3PMLWSI7_exports = {};
20
+ __export(chunk_3PMLWSI7_exports, {
21
21
  PrismaInstrumentation: () => PrismaInstrumentation
22
22
  });
23
- module.exports = __toCommonJS(chunk_NCD3XYIR_exports);
24
- var import_chunk_O7OBHTYQ = require("./chunk-O7OBHTYQ.js");
25
- var import_chunk_Q46VXSDK = require("./chunk-Q46VXSDK.js");
23
+ module.exports = __toCommonJS(chunk_3PMLWSI7_exports);
24
+ var import_chunk_TUF6OX4N = require("./chunk-TUF6OX4N.js");
25
+ var import_chunk_E5Y3EHPM = require("./chunk-E5Y3EHPM.js");
26
+ var import_api = require("@opentelemetry/api");
26
27
  var import_instrumentation = require("@opentelemetry/instrumentation");
27
28
  var PrismaInstrumentation = class extends import_instrumentation.InstrumentationBase {
28
29
  constructor(config = {}) {
29
- super(import_chunk_Q46VXSDK.NAME, import_chunk_Q46VXSDK.VERSION, config);
30
+ super(import_chunk_E5Y3EHPM.NAME, import_chunk_E5Y3EHPM.VERSION, config);
31
+ }
32
+ setTracerProvider(tracerProvider) {
33
+ this.tracerProvider = tracerProvider;
30
34
  }
31
35
  init() {
32
- const module2 = new import_instrumentation.InstrumentationNodeModuleDefinition(import_chunk_Q46VXSDK.MODULE_NAME, [import_chunk_Q46VXSDK.VERSION]);
36
+ const module2 = new import_instrumentation.InstrumentationNodeModuleDefinition(import_chunk_E5Y3EHPM.MODULE_NAME, [import_chunk_E5Y3EHPM.VERSION]);
33
37
  return [module2];
34
38
  }
35
39
  enable() {
36
40
  const config = this._config;
37
41
  const globalValue = {
38
- helper: new import_chunk_O7OBHTYQ.ActiveTracingHelper({ traceMiddleware: config.middleware ?? false })
42
+ helper: new import_chunk_TUF6OX4N.ActiveTracingHelper({
43
+ traceMiddleware: config.middleware ?? false,
44
+ tracerProvider: this.tracerProvider ?? import_api.trace.getTracerProvider()
45
+ })
39
46
  };
40
- global[import_chunk_Q46VXSDK.GLOBAL_KEY] = globalValue;
47
+ global[import_chunk_E5Y3EHPM.GLOBAL_KEY] = globalValue;
41
48
  }
42
49
  disable() {
43
- delete global[import_chunk_Q46VXSDK.GLOBAL_KEY];
50
+ delete global[import_chunk_E5Y3EHPM.GLOBAL_KEY];
44
51
  }
45
52
  isEnabled() {
46
- return Boolean(global[import_chunk_Q46VXSDK.GLOBAL_KEY]);
53
+ return Boolean(global[import_chunk_E5Y3EHPM.GLOBAL_KEY]);
47
54
  }
48
55
  };
@@ -16,20 +16,20 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_Q46VXSDK_exports = {};
20
- __export(chunk_Q46VXSDK_exports, {
19
+ var chunk_E5Y3EHPM_exports = {};
20
+ __export(chunk_E5Y3EHPM_exports, {
21
21
  GLOBAL_KEY: () => GLOBAL_KEY,
22
22
  MODULE_NAME: () => MODULE_NAME,
23
23
  NAME: () => NAME,
24
24
  VERSION: () => VERSION
25
25
  });
26
- module.exports = __toCommonJS(chunk_Q46VXSDK_exports);
26
+ module.exports = __toCommonJS(chunk_E5Y3EHPM_exports);
27
27
  var import_chunk_FTA5RKYX = require("./chunk-FTA5RKYX.js");
28
28
  var require_package = (0, import_chunk_FTA5RKYX.__commonJS)({
29
29
  "package.json"(exports, module2) {
30
30
  module2.exports = {
31
31
  name: "@prisma/instrumentation",
32
- version: "6.3.0-integration-simpler-typeinfo-query.1",
32
+ version: "6.3.0-integration-studio-ux-refinements.1",
33
33
  description: "OpenTelemetry compliant instrumentation for Prisma Client",
34
34
  main: "dist/index.js",
35
35
  types: "dist/index.d.ts",
@@ -43,17 +43,19 @@ var require_package = (0, import_chunk_FTA5RKYX.__commonJS)({
43
43
  bugs: "https://github.com/prisma/prisma/issues",
44
44
  devDependencies: {
45
45
  "@prisma/internals": "workspace:*",
46
- "@swc/core": "1.6.13",
47
- "@types/jest": "29.5.12",
46
+ "@swc/core": "1.10.1",
47
+ "@types/jest": "29.5.14",
48
48
  "@types/node": "18.19.31",
49
+ "@opentelemetry/api": "1.9.0",
49
50
  jest: "29.7.0",
50
51
  "jest-junit": "16.0.0",
51
52
  typescript: "5.4.5"
52
53
  },
53
54
  dependencies: {
54
- "@opentelemetry/api": "^1.8",
55
- "@opentelemetry/instrumentation": "^0.49 || ^0.50 || ^0.51 || ^0.52.0 || ^0.53.0",
56
- "@opentelemetry/sdk-trace-base": "^1.22"
55
+ "@opentelemetry/instrumentation": "^0.52.0 || ^0.53.0 || ^0.54.0 || ^0.55.0 || ^0.56.0 || ^0.57.0"
56
+ },
57
+ peerDependencies: {
58
+ "@opentelemetry/api": "^1.8"
57
59
  },
58
60
  files: [
59
61
  "dist"
@@ -78,4 +80,4 @@ var { version, name } = require_package();
78
80
  var GLOBAL_KEY = "PRISMA_INSTRUMENTATION";
79
81
  var VERSION = version;
80
82
  var NAME = name;
81
- var MODULE_NAME = "prisma";
83
+ var MODULE_NAME = "@prisma/client";
@@ -16,33 +16,40 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_YIAJHTIL_exports = {};
20
- __export(chunk_YIAJHTIL_exports, {
19
+ var chunk_R7XTOVI7_exports = {};
20
+ __export(chunk_R7XTOVI7_exports, {
21
21
  PrismaInstrumentation: () => PrismaInstrumentation
22
22
  });
23
- module.exports = __toCommonJS(chunk_YIAJHTIL_exports);
24
- var import_chunk_O7OBHTYQ = require("./chunk-O7OBHTYQ.js");
25
- var import_chunk_KSVJP65B = require("./chunk-KSVJP65B.js");
23
+ module.exports = __toCommonJS(chunk_R7XTOVI7_exports);
24
+ var import_chunk_TUF6OX4N = require("./chunk-TUF6OX4N.js");
25
+ var import_chunk_2ZWIQFM7 = require("./chunk-2ZWIQFM7.js");
26
+ var import_api = require("@opentelemetry/api");
26
27
  var import_instrumentation = require("@opentelemetry/instrumentation");
27
28
  var PrismaInstrumentation = class extends import_instrumentation.InstrumentationBase {
28
29
  constructor(config = {}) {
29
- super(import_chunk_KSVJP65B.NAME, import_chunk_KSVJP65B.VERSION, config);
30
+ super(import_chunk_2ZWIQFM7.NAME, import_chunk_2ZWIQFM7.VERSION, config);
31
+ }
32
+ setTracerProvider(tracerProvider) {
33
+ this.tracerProvider = tracerProvider;
30
34
  }
31
35
  init() {
32
- const module2 = new import_instrumentation.InstrumentationNodeModuleDefinition(import_chunk_KSVJP65B.MODULE_NAME, [import_chunk_KSVJP65B.VERSION]);
36
+ const module2 = new import_instrumentation.InstrumentationNodeModuleDefinition(import_chunk_2ZWIQFM7.MODULE_NAME, [import_chunk_2ZWIQFM7.VERSION]);
33
37
  return [module2];
34
38
  }
35
39
  enable() {
36
40
  const config = this._config;
37
41
  const globalValue = {
38
- helper: new import_chunk_O7OBHTYQ.ActiveTracingHelper({ traceMiddleware: config.middleware ?? false })
42
+ helper: new import_chunk_TUF6OX4N.ActiveTracingHelper({
43
+ traceMiddleware: config.middleware ?? false,
44
+ tracerProvider: this.tracerProvider ?? import_api.trace.getTracerProvider()
45
+ })
39
46
  };
40
- global[import_chunk_KSVJP65B.GLOBAL_KEY] = globalValue;
47
+ global[import_chunk_2ZWIQFM7.GLOBAL_KEY] = globalValue;
41
48
  }
42
49
  disable() {
43
- delete global[import_chunk_KSVJP65B.GLOBAL_KEY];
50
+ delete global[import_chunk_2ZWIQFM7.GLOBAL_KEY];
44
51
  }
45
52
  isEnabled() {
46
- return Boolean(global[import_chunk_KSVJP65B.GLOBAL_KEY]);
53
+ return Boolean(global[import_chunk_2ZWIQFM7.GLOBAL_KEY]);
47
54
  }
48
55
  };
@@ -16,16 +16,15 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_O7OBHTYQ_exports = {};
20
- __export(chunk_O7OBHTYQ_exports, {
19
+ var chunk_TUF6OX4N_exports = {};
20
+ __export(chunk_TUF6OX4N_exports, {
21
21
  ActiveTracingHelper: () => ActiveTracingHelper
22
22
  });
23
- module.exports = __toCommonJS(chunk_O7OBHTYQ_exports);
23
+ module.exports = __toCommonJS(chunk_TUF6OX4N_exports);
24
24
  var import_api = require("@opentelemetry/api");
25
- var import_sdk_trace_base = require("@opentelemetry/sdk-trace-base");
26
25
  var showAllTraces = process.env.PRISMA_SHOW_ALL_TRACES === "true";
27
26
  var nonSampledTraceParent = `00-10-10-00`;
28
- function engineSpanKindToOTELSpanKind(engineSpanKind) {
27
+ function engineSpanKindToOtelSpanKind(engineSpanKind) {
29
28
  switch (engineSpanKind) {
30
29
  case "client":
31
30
  return import_api.SpanKind.CLIENT;
@@ -35,8 +34,9 @@ function engineSpanKindToOTELSpanKind(engineSpanKind) {
35
34
  }
36
35
  }
37
36
  var ActiveTracingHelper = class {
38
- constructor({ traceMiddleware }) {
37
+ constructor({ traceMiddleware, tracerProvider }) {
39
38
  this.traceMiddleware = traceMiddleware;
39
+ this.tracerProvider = tracerProvider;
40
40
  }
41
41
  isEnabled() {
42
42
  return true;
@@ -48,39 +48,13 @@ var ActiveTracingHelper = class {
48
48
  }
49
49
  return nonSampledTraceParent;
50
50
  }
51
- createEngineSpan(engineSpanEvent) {
52
- const tracer = import_api.trace.getTracer("prisma");
53
- engineSpanEvent.spans.forEach((engineSpan) => {
54
- const spanKind = engineSpanKindToOTELSpanKind(engineSpan.kind);
55
- const spanContext = {
56
- traceId: engineSpan.trace_id,
57
- spanId: engineSpan.span_id,
58
- traceFlags: import_api.TraceFlags.SAMPLED
59
- };
60
- const links = engineSpan.links?.map((link) => {
61
- return {
62
- context: {
63
- traceId: link.trace_id,
64
- spanId: link.span_id,
65
- traceFlags: import_api.TraceFlags.SAMPLED
66
- }
67
- };
68
- });
69
- const span = new import_sdk_trace_base.Span(
70
- tracer,
71
- import_api.ROOT_CONTEXT,
72
- engineSpan.name,
73
- spanContext,
74
- spanKind,
75
- engineSpan.parent_span_id,
76
- links,
77
- engineSpan.start_time
78
- );
79
- if (engineSpan.attributes) {
80
- span.setAttributes(engineSpan.attributes);
81
- }
82
- span.end(engineSpan.end_time);
83
- });
51
+ dispatchEngineSpans(spans) {
52
+ const tracer = this.tracerProvider.getTracer("prisma");
53
+ const linkIds = /* @__PURE__ */ new Map();
54
+ const roots = spans.filter((span) => span.parentId === null);
55
+ for (const root of roots) {
56
+ dispatchEngineSpan(tracer, root, spans, linkIds);
57
+ }
84
58
  }
85
59
  getActiveContext() {
86
60
  return import_api.context.active();
@@ -95,7 +69,7 @@ var ActiveTracingHelper = class {
95
69
  if (options.middleware && !this.traceMiddleware) {
96
70
  return callback();
97
71
  }
98
- const tracer = import_api.trace.getTracer("prisma");
72
+ const tracer = this.tracerProvider.getTracer("prisma");
99
73
  const context = options.context ?? this.getActiveContext();
100
74
  const name = `prisma:client:${options.name}`;
101
75
  if (options.active === false) {
@@ -105,6 +79,38 @@ var ActiveTracingHelper = class {
105
79
  return tracer.startActiveSpan(name, options, (span) => endSpan(span, callback(span, context)));
106
80
  }
107
81
  };
82
+ function dispatchEngineSpan(tracer, engineSpan, allSpans, linkIds) {
83
+ const spanOptions = {
84
+ attributes: engineSpan.attributes,
85
+ kind: engineSpanKindToOtelSpanKind(engineSpan.kind),
86
+ startTime: engineSpan.startTime
87
+ };
88
+ tracer.startActiveSpan(engineSpan.name, spanOptions, (span) => {
89
+ linkIds.set(engineSpan.id, span.spanContext().spanId);
90
+ if (engineSpan.links) {
91
+ span.addLinks(
92
+ engineSpan.links.flatMap((link) => {
93
+ const linkedId = linkIds.get(link);
94
+ if (!linkedId) {
95
+ return [];
96
+ }
97
+ return {
98
+ context: {
99
+ spanId: linkedId,
100
+ traceId: span.spanContext().traceId,
101
+ traceFlags: span.spanContext().traceFlags
102
+ }
103
+ };
104
+ })
105
+ );
106
+ }
107
+ const children = allSpans.filter((s) => s.parentId === engineSpan.id);
108
+ for (const child of children) {
109
+ dispatchEngineSpan(tracer, child, allSpans, linkIds);
110
+ }
111
+ span.end(engineSpan.endTime);
112
+ });
113
+ }
108
114
  function endSpan(span, result) {
109
115
  if (isPromiseLike(result)) {
110
116
  return result.then(
@@ -1,4 +1,4 @@
1
1
  export declare const GLOBAL_KEY = "PRISMA_INSTRUMENTATION";
2
2
  export declare const VERSION: string;
3
3
  export declare const NAME: string;
4
- export declare const MODULE_NAME = "prisma";
4
+ export declare const MODULE_NAME = "@prisma/client";
package/dist/constants.js CHANGED
@@ -18,11 +18,11 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var constants_exports = {};
20
20
  __export(constants_exports, {
21
- GLOBAL_KEY: () => import_chunk_Q46VXSDK.GLOBAL_KEY,
22
- MODULE_NAME: () => import_chunk_Q46VXSDK.MODULE_NAME,
23
- NAME: () => import_chunk_Q46VXSDK.NAME,
24
- VERSION: () => import_chunk_Q46VXSDK.VERSION
21
+ GLOBAL_KEY: () => import_chunk_E5Y3EHPM.GLOBAL_KEY,
22
+ MODULE_NAME: () => import_chunk_E5Y3EHPM.MODULE_NAME,
23
+ NAME: () => import_chunk_E5Y3EHPM.NAME,
24
+ VERSION: () => import_chunk_E5Y3EHPM.VERSION
25
25
  });
26
26
  module.exports = __toCommonJS(constants_exports);
27
- var import_chunk_Q46VXSDK = require("./chunk-Q46VXSDK.js");
27
+ var import_chunk_E5Y3EHPM = require("./chunk-E5Y3EHPM.js");
28
28
  var import_chunk_FTA5RKYX = require("./chunk-FTA5RKYX.js");
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export { PrismaInstrumentation } from './PrismaInstrumentation';
2
+ export { registerInstrumentations } from '@opentelemetry/instrumentation';
package/dist/index.js CHANGED
@@ -16,12 +16,14 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var dist_exports = {};
20
- __export(dist_exports, {
21
- PrismaInstrumentation: () => import_chunk_NCD3XYIR.PrismaInstrumentation
19
+ var index_exports = {};
20
+ __export(index_exports, {
21
+ PrismaInstrumentation: () => import_chunk_3PMLWSI7.PrismaInstrumentation,
22
+ registerInstrumentations: () => import_instrumentation.registerInstrumentations
22
23
  });
23
- module.exports = __toCommonJS(dist_exports);
24
- var import_chunk_NCD3XYIR = require("./chunk-NCD3XYIR.js");
25
- var import_chunk_O7OBHTYQ = require("./chunk-O7OBHTYQ.js");
26
- var import_chunk_Q46VXSDK = require("./chunk-Q46VXSDK.js");
24
+ module.exports = __toCommonJS(index_exports);
25
+ var import_chunk_3PMLWSI7 = require("./chunk-3PMLWSI7.js");
26
+ var import_chunk_TUF6OX4N = require("./chunk-TUF6OX4N.js");
27
+ var import_chunk_E5Y3EHPM = require("./chunk-E5Y3EHPM.js");
27
28
  var import_chunk_FTA5RKYX = require("./chunk-FTA5RKYX.js");
29
+ var import_instrumentation = require("@opentelemetry/instrumentation");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/instrumentation",
3
- "version": "6.3.0-integration-simpler-typeinfo-query.1",
3
+ "version": "6.3.0-integration-studio-ux-refinements.1",
4
4
  "description": "OpenTelemetry compliant instrumentation for Prisma Client",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,18 +13,20 @@
13
13
  },
14
14
  "bugs": "https://github.com/prisma/prisma/issues",
15
15
  "devDependencies": {
16
- "@swc/core": "1.6.13",
17
- "@types/jest": "29.5.12",
16
+ "@swc/core": "1.10.1",
17
+ "@types/jest": "29.5.14",
18
18
  "@types/node": "18.19.31",
19
+ "@opentelemetry/api": "1.9.0",
19
20
  "jest": "29.7.0",
20
21
  "jest-junit": "16.0.0",
21
22
  "typescript": "5.4.5",
22
- "@prisma/internals": "6.3.0-integration-simpler-typeinfo-query.1"
23
+ "@prisma/internals": "6.3.0-integration-studio-ux-refinements.1"
23
24
  },
24
25
  "dependencies": {
25
- "@opentelemetry/api": "^1.8",
26
- "@opentelemetry/instrumentation": "^0.49 || ^0.50 || ^0.51 || ^0.52.0 || ^0.53.0",
27
- "@opentelemetry/sdk-trace-base": "^1.22"
26
+ "@opentelemetry/instrumentation": "^0.52.0 || ^0.53.0 || ^0.54.0 || ^0.55.0 || ^0.56.0 || ^0.57.0"
27
+ },
28
+ "peerDependencies": {
29
+ "@opentelemetry/api": "^1.8"
28
30
  },
29
31
  "files": [
30
32
  "dist"