@databricks/appkit 0.69.3 → 0.71.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.
- package/dist/appkit/package.js +1 -1
- package/dist/core/appkit.d.ts.map +1 -1
- package/dist/core/appkit.js +1 -0
- package/dist/core/appkit.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/plugin/plugin.d.ts +1 -1
- package/dist/plugin/plugin.js +1 -1
- package/dist/plugin/plugin.js.map +1 -1
- package/dist/plugins/agents/agents.d.ts.map +1 -1
- package/dist/plugins/agents/agents.js +4 -1
- package/dist/plugins/agents/agents.js.map +1 -1
- package/dist/plugins/agents/mlflow.js +267 -11
- package/dist/plugins/agents/mlflow.js.map +1 -1
- package/dist/plugins/server/index.d.ts +3 -0
- package/dist/plugins/server/index.d.ts.map +1 -1
- package/dist/plugins/server/index.js +2 -2
- package/dist/plugins/server/index.js.map +1 -1
- package/dist/plugins/server/remote-tunnel/remote-tunnel-manager.js +3 -3
- package/dist/plugins/server/remote-tunnel/remote-tunnel-manager.js.map +1 -1
- package/dist/plugins/server/static-server.js +3 -3
- package/dist/plugins/server/static-server.js.map +1 -1
- package/dist/plugins/server/utils.js +3 -3
- package/dist/plugins/server/utils.js.map +1 -1
- package/dist/plugins/server/vite-dev-server.js +4 -4
- package/dist/plugins/server/vite-dev-server.js.map +1 -1
- package/dist/shared/src/index.d.ts +1 -1
- package/dist/shared/src/plugin.d.ts +8 -0
- package/dist/shared/src/plugin.d.ts.map +1 -1
- package/dist/shared/src/schemas/manifest.d.ts +33 -33
- package/dist/stream/stream-manager.d.ts +1 -1
- package/dist/telemetry/index.js +2 -2
- package/dist/telemetry/telemetry-manager.d.ts +2 -1
- package/dist/telemetry/telemetry-manager.js +114 -26
- package/dist/telemetry/telemetry-manager.js.map +1 -1
- package/dist/type-generator/database/generate.js +3 -3
- package/dist/type-generator/database/generate.js.map +1 -1
- package/dist/type-generator/errors.js +45 -11
- package/dist/type-generator/errors.js.map +1 -1
- package/dist/type-generator/migration.js +2 -2
- package/dist/type-generator/migration.js.map +1 -1
- package/dist/type-generator/mv-registry/sync.js +3 -3
- package/dist/type-generator/mv-registry/sync.js.map +1 -1
- package/dist/type-generator/mv-registry/types.d.ts +5 -2
- package/dist/type-generator/mv-registry/types.d.ts.map +1 -1
- package/dist/type-generator/query-registry.js +3 -3
- package/dist/type-generator/query-registry.js.map +1 -1
- package/dist/type-generator/serving/server-file-extractor.js +3 -3
- package/dist/type-generator/serving/server-file-extractor.js.map +1 -1
- package/docs/api/appkit/Interface.AgentsPluginConfig.md +16 -1
- package/docs/api/appkit/Interface.BasePluginConfig.md +11 -0
- package/docs/api/appkit/Interface.IAiSearchConfig.md +16 -1
- package/docs/api/appkit/Interface.IJobsConfig.md +16 -1
- package/package.json +4 -4
- package/sbom.cdx.json +1 -1
|
@@ -12,12 +12,12 @@ declare const resourceFieldEntrySchema: z.ZodObject<{
|
|
|
12
12
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
13
13
|
type: z.ZodLiteral<"kind">;
|
|
14
14
|
resourceKind: z.ZodEnum<{
|
|
15
|
-
volume: "volume";
|
|
16
15
|
warehouse: "warehouse";
|
|
17
16
|
genie_space: "genie_space";
|
|
18
17
|
postgres_project: "postgres_project";
|
|
19
18
|
postgres_branch: "postgres_branch";
|
|
20
19
|
postgres_database: "postgres_database";
|
|
20
|
+
volume: "volume";
|
|
21
21
|
}>;
|
|
22
22
|
select: z.ZodOptional<z.ZodString>;
|
|
23
23
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -58,12 +58,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
58
58
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
59
59
|
type: z.ZodLiteral<"kind">;
|
|
60
60
|
resourceKind: z.ZodEnum<{
|
|
61
|
-
volume: "volume";
|
|
62
61
|
warehouse: "warehouse";
|
|
63
62
|
genie_space: "genie_space";
|
|
64
63
|
postgres_project: "postgres_project";
|
|
65
64
|
postgres_branch: "postgres_branch";
|
|
66
65
|
postgres_database: "postgres_database";
|
|
66
|
+
volume: "volume";
|
|
67
67
|
}>;
|
|
68
68
|
select: z.ZodOptional<z.ZodString>;
|
|
69
69
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -99,12 +99,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
99
99
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
100
100
|
type: z.ZodLiteral<"kind">;
|
|
101
101
|
resourceKind: z.ZodEnum<{
|
|
102
|
-
volume: "volume";
|
|
103
102
|
warehouse: "warehouse";
|
|
104
103
|
genie_space: "genie_space";
|
|
105
104
|
postgres_project: "postgres_project";
|
|
106
105
|
postgres_branch: "postgres_branch";
|
|
107
106
|
postgres_database: "postgres_database";
|
|
107
|
+
volume: "volume";
|
|
108
108
|
}>;
|
|
109
109
|
select: z.ZodOptional<z.ZodString>;
|
|
110
110
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -139,12 +139,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
139
139
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
140
140
|
type: z.ZodLiteral<"kind">;
|
|
141
141
|
resourceKind: z.ZodEnum<{
|
|
142
|
-
volume: "volume";
|
|
143
142
|
warehouse: "warehouse";
|
|
144
143
|
genie_space: "genie_space";
|
|
145
144
|
postgres_project: "postgres_project";
|
|
146
145
|
postgres_branch: "postgres_branch";
|
|
147
146
|
postgres_database: "postgres_database";
|
|
147
|
+
volume: "volume";
|
|
148
148
|
}>;
|
|
149
149
|
select: z.ZodOptional<z.ZodString>;
|
|
150
150
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -162,9 +162,9 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
162
162
|
type: z.ZodLiteral<"sql_warehouse">;
|
|
163
163
|
}, z.core.$strict>, z.ZodObject<{
|
|
164
164
|
permission: z.ZodEnum<{
|
|
165
|
-
CAN_QUERY: "CAN_QUERY";
|
|
166
165
|
CAN_VIEW: "CAN_VIEW";
|
|
167
166
|
CAN_MANAGE: "CAN_MANAGE";
|
|
167
|
+
CAN_QUERY: "CAN_QUERY";
|
|
168
168
|
}>;
|
|
169
169
|
alias: z.ZodString;
|
|
170
170
|
resourceKey: z.ZodString;
|
|
@@ -180,12 +180,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
180
180
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
181
181
|
type: z.ZodLiteral<"kind">;
|
|
182
182
|
resourceKind: z.ZodEnum<{
|
|
183
|
-
volume: "volume";
|
|
184
183
|
warehouse: "warehouse";
|
|
185
184
|
genie_space: "genie_space";
|
|
186
185
|
postgres_project: "postgres_project";
|
|
187
186
|
postgres_branch: "postgres_branch";
|
|
188
187
|
postgres_database: "postgres_database";
|
|
188
|
+
volume: "volume";
|
|
189
189
|
}>;
|
|
190
190
|
select: z.ZodOptional<z.ZodString>;
|
|
191
191
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -220,12 +220,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
220
220
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
221
221
|
type: z.ZodLiteral<"kind">;
|
|
222
222
|
resourceKind: z.ZodEnum<{
|
|
223
|
-
volume: "volume";
|
|
224
223
|
warehouse: "warehouse";
|
|
225
224
|
genie_space: "genie_space";
|
|
226
225
|
postgres_project: "postgres_project";
|
|
227
226
|
postgres_branch: "postgres_branch";
|
|
228
227
|
postgres_database: "postgres_database";
|
|
228
|
+
volume: "volume";
|
|
229
229
|
}>;
|
|
230
230
|
select: z.ZodOptional<z.ZodString>;
|
|
231
231
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -259,12 +259,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
259
259
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
260
260
|
type: z.ZodLiteral<"kind">;
|
|
261
261
|
resourceKind: z.ZodEnum<{
|
|
262
|
-
volume: "volume";
|
|
263
262
|
warehouse: "warehouse";
|
|
264
263
|
genie_space: "genie_space";
|
|
265
264
|
postgres_project: "postgres_project";
|
|
266
265
|
postgres_branch: "postgres_branch";
|
|
267
266
|
postgres_database: "postgres_database";
|
|
267
|
+
volume: "volume";
|
|
268
268
|
}>;
|
|
269
269
|
select: z.ZodOptional<z.ZodString>;
|
|
270
270
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -298,12 +298,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
298
298
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
299
299
|
type: z.ZodLiteral<"kind">;
|
|
300
300
|
resourceKind: z.ZodEnum<{
|
|
301
|
-
volume: "volume";
|
|
302
301
|
warehouse: "warehouse";
|
|
303
302
|
genie_space: "genie_space";
|
|
304
303
|
postgres_project: "postgres_project";
|
|
305
304
|
postgres_branch: "postgres_branch";
|
|
306
305
|
postgres_database: "postgres_database";
|
|
306
|
+
volume: "volume";
|
|
307
307
|
}>;
|
|
308
308
|
select: z.ZodOptional<z.ZodString>;
|
|
309
309
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -337,12 +337,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
337
337
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
338
338
|
type: z.ZodLiteral<"kind">;
|
|
339
339
|
resourceKind: z.ZodEnum<{
|
|
340
|
-
volume: "volume";
|
|
341
340
|
warehouse: "warehouse";
|
|
342
341
|
genie_space: "genie_space";
|
|
343
342
|
postgres_project: "postgres_project";
|
|
344
343
|
postgres_branch: "postgres_branch";
|
|
345
344
|
postgres_database: "postgres_database";
|
|
345
|
+
volume: "volume";
|
|
346
346
|
}>;
|
|
347
347
|
select: z.ZodOptional<z.ZodString>;
|
|
348
348
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -376,12 +376,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
376
376
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
377
377
|
type: z.ZodLiteral<"kind">;
|
|
378
378
|
resourceKind: z.ZodEnum<{
|
|
379
|
-
volume: "volume";
|
|
380
379
|
warehouse: "warehouse";
|
|
381
380
|
genie_space: "genie_space";
|
|
382
381
|
postgres_project: "postgres_project";
|
|
383
382
|
postgres_branch: "postgres_branch";
|
|
384
383
|
postgres_database: "postgres_database";
|
|
384
|
+
volume: "volume";
|
|
385
385
|
}>;
|
|
386
386
|
select: z.ZodOptional<z.ZodString>;
|
|
387
387
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -415,12 +415,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
415
415
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
416
416
|
type: z.ZodLiteral<"kind">;
|
|
417
417
|
resourceKind: z.ZodEnum<{
|
|
418
|
-
volume: "volume";
|
|
419
418
|
warehouse: "warehouse";
|
|
420
419
|
genie_space: "genie_space";
|
|
421
420
|
postgres_project: "postgres_project";
|
|
422
421
|
postgres_branch: "postgres_branch";
|
|
423
422
|
postgres_database: "postgres_database";
|
|
423
|
+
volume: "volume";
|
|
424
424
|
}>;
|
|
425
425
|
select: z.ZodOptional<z.ZodString>;
|
|
426
426
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -438,10 +438,10 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
438
438
|
type: z.ZodLiteral<"postgres">;
|
|
439
439
|
}, z.core.$strict>, z.ZodObject<{
|
|
440
440
|
permission: z.ZodEnum<{
|
|
441
|
-
CAN_EDIT: "CAN_EDIT";
|
|
442
441
|
CAN_VIEW: "CAN_VIEW";
|
|
443
442
|
CAN_MANAGE: "CAN_MANAGE";
|
|
444
443
|
CAN_RUN: "CAN_RUN";
|
|
444
|
+
CAN_EDIT: "CAN_EDIT";
|
|
445
445
|
}>;
|
|
446
446
|
alias: z.ZodString;
|
|
447
447
|
resourceKey: z.ZodString;
|
|
@@ -457,12 +457,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
457
457
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
458
458
|
type: z.ZodLiteral<"kind">;
|
|
459
459
|
resourceKind: z.ZodEnum<{
|
|
460
|
-
volume: "volume";
|
|
461
460
|
warehouse: "warehouse";
|
|
462
461
|
genie_space: "genie_space";
|
|
463
462
|
postgres_project: "postgres_project";
|
|
464
463
|
postgres_branch: "postgres_branch";
|
|
465
464
|
postgres_database: "postgres_database";
|
|
465
|
+
volume: "volume";
|
|
466
466
|
}>;
|
|
467
467
|
select: z.ZodOptional<z.ZodString>;
|
|
468
468
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -480,8 +480,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
480
480
|
type: z.ZodLiteral<"genie_space">;
|
|
481
481
|
}, z.core.$strict>, z.ZodObject<{
|
|
482
482
|
permission: z.ZodEnum<{
|
|
483
|
-
CAN_EDIT: "CAN_EDIT";
|
|
484
483
|
CAN_MANAGE: "CAN_MANAGE";
|
|
484
|
+
CAN_EDIT: "CAN_EDIT";
|
|
485
485
|
CAN_READ: "CAN_READ";
|
|
486
486
|
}>;
|
|
487
487
|
alias: z.ZodString;
|
|
@@ -498,12 +498,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
498
498
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
499
499
|
type: z.ZodLiteral<"kind">;
|
|
500
500
|
resourceKind: z.ZodEnum<{
|
|
501
|
-
volume: "volume";
|
|
502
501
|
warehouse: "warehouse";
|
|
503
502
|
genie_space: "genie_space";
|
|
504
503
|
postgres_project: "postgres_project";
|
|
505
504
|
postgres_branch: "postgres_branch";
|
|
506
505
|
postgres_database: "postgres_database";
|
|
506
|
+
volume: "volume";
|
|
507
507
|
}>;
|
|
508
508
|
select: z.ZodOptional<z.ZodString>;
|
|
509
509
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -537,12 +537,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
537
537
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
538
538
|
type: z.ZodLiteral<"kind">;
|
|
539
539
|
resourceKind: z.ZodEnum<{
|
|
540
|
-
volume: "volume";
|
|
541
540
|
warehouse: "warehouse";
|
|
542
541
|
genie_space: "genie_space";
|
|
543
542
|
postgres_project: "postgres_project";
|
|
544
543
|
postgres_branch: "postgres_branch";
|
|
545
544
|
postgres_database: "postgres_database";
|
|
545
|
+
volume: "volume";
|
|
546
546
|
}>;
|
|
547
547
|
select: z.ZodOptional<z.ZodString>;
|
|
548
548
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -579,12 +579,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
579
579
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
580
580
|
type: z.ZodLiteral<"kind">;
|
|
581
581
|
resourceKind: z.ZodEnum<{
|
|
582
|
-
volume: "volume";
|
|
583
582
|
warehouse: "warehouse";
|
|
584
583
|
genie_space: "genie_space";
|
|
585
584
|
postgres_project: "postgres_project";
|
|
586
585
|
postgres_branch: "postgres_branch";
|
|
587
586
|
postgres_database: "postgres_database";
|
|
587
|
+
volume: "volume";
|
|
588
588
|
}>;
|
|
589
589
|
select: z.ZodOptional<z.ZodString>;
|
|
590
590
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -620,12 +620,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
620
620
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
621
621
|
type: z.ZodLiteral<"kind">;
|
|
622
622
|
resourceKind: z.ZodEnum<{
|
|
623
|
-
volume: "volume";
|
|
624
623
|
warehouse: "warehouse";
|
|
625
624
|
genie_space: "genie_space";
|
|
626
625
|
postgres_project: "postgres_project";
|
|
627
626
|
postgres_branch: "postgres_branch";
|
|
628
627
|
postgres_database: "postgres_database";
|
|
628
|
+
volume: "volume";
|
|
629
629
|
}>;
|
|
630
630
|
select: z.ZodOptional<z.ZodString>;
|
|
631
631
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -660,12 +660,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
660
660
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
661
661
|
type: z.ZodLiteral<"kind">;
|
|
662
662
|
resourceKind: z.ZodEnum<{
|
|
663
|
-
volume: "volume";
|
|
664
663
|
warehouse: "warehouse";
|
|
665
664
|
genie_space: "genie_space";
|
|
666
665
|
postgres_project: "postgres_project";
|
|
667
666
|
postgres_branch: "postgres_branch";
|
|
668
667
|
postgres_database: "postgres_database";
|
|
668
|
+
volume: "volume";
|
|
669
669
|
}>;
|
|
670
670
|
select: z.ZodOptional<z.ZodString>;
|
|
671
671
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -683,9 +683,9 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
683
683
|
type: z.ZodLiteral<"sql_warehouse">;
|
|
684
684
|
}, z.core.$strict>, z.ZodObject<{
|
|
685
685
|
permission: z.ZodEnum<{
|
|
686
|
-
CAN_QUERY: "CAN_QUERY";
|
|
687
686
|
CAN_VIEW: "CAN_VIEW";
|
|
688
687
|
CAN_MANAGE: "CAN_MANAGE";
|
|
688
|
+
CAN_QUERY: "CAN_QUERY";
|
|
689
689
|
}>;
|
|
690
690
|
alias: z.ZodString;
|
|
691
691
|
resourceKey: z.ZodString;
|
|
@@ -701,12 +701,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
701
701
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
702
702
|
type: z.ZodLiteral<"kind">;
|
|
703
703
|
resourceKind: z.ZodEnum<{
|
|
704
|
-
volume: "volume";
|
|
705
704
|
warehouse: "warehouse";
|
|
706
705
|
genie_space: "genie_space";
|
|
707
706
|
postgres_project: "postgres_project";
|
|
708
707
|
postgres_branch: "postgres_branch";
|
|
709
708
|
postgres_database: "postgres_database";
|
|
709
|
+
volume: "volume";
|
|
710
710
|
}>;
|
|
711
711
|
select: z.ZodOptional<z.ZodString>;
|
|
712
712
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -741,12 +741,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
741
741
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
742
742
|
type: z.ZodLiteral<"kind">;
|
|
743
743
|
resourceKind: z.ZodEnum<{
|
|
744
|
-
volume: "volume";
|
|
745
744
|
warehouse: "warehouse";
|
|
746
745
|
genie_space: "genie_space";
|
|
747
746
|
postgres_project: "postgres_project";
|
|
748
747
|
postgres_branch: "postgres_branch";
|
|
749
748
|
postgres_database: "postgres_database";
|
|
749
|
+
volume: "volume";
|
|
750
750
|
}>;
|
|
751
751
|
select: z.ZodOptional<z.ZodString>;
|
|
752
752
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -780,12 +780,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
780
780
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
781
781
|
type: z.ZodLiteral<"kind">;
|
|
782
782
|
resourceKind: z.ZodEnum<{
|
|
783
|
-
volume: "volume";
|
|
784
783
|
warehouse: "warehouse";
|
|
785
784
|
genie_space: "genie_space";
|
|
786
785
|
postgres_project: "postgres_project";
|
|
787
786
|
postgres_branch: "postgres_branch";
|
|
788
787
|
postgres_database: "postgres_database";
|
|
788
|
+
volume: "volume";
|
|
789
789
|
}>;
|
|
790
790
|
select: z.ZodOptional<z.ZodString>;
|
|
791
791
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -819,12 +819,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
819
819
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
820
820
|
type: z.ZodLiteral<"kind">;
|
|
821
821
|
resourceKind: z.ZodEnum<{
|
|
822
|
-
volume: "volume";
|
|
823
822
|
warehouse: "warehouse";
|
|
824
823
|
genie_space: "genie_space";
|
|
825
824
|
postgres_project: "postgres_project";
|
|
826
825
|
postgres_branch: "postgres_branch";
|
|
827
826
|
postgres_database: "postgres_database";
|
|
827
|
+
volume: "volume";
|
|
828
828
|
}>;
|
|
829
829
|
select: z.ZodOptional<z.ZodString>;
|
|
830
830
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -858,12 +858,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
858
858
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
859
859
|
type: z.ZodLiteral<"kind">;
|
|
860
860
|
resourceKind: z.ZodEnum<{
|
|
861
|
-
volume: "volume";
|
|
862
861
|
warehouse: "warehouse";
|
|
863
862
|
genie_space: "genie_space";
|
|
864
863
|
postgres_project: "postgres_project";
|
|
865
864
|
postgres_branch: "postgres_branch";
|
|
866
865
|
postgres_database: "postgres_database";
|
|
866
|
+
volume: "volume";
|
|
867
867
|
}>;
|
|
868
868
|
select: z.ZodOptional<z.ZodString>;
|
|
869
869
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -897,12 +897,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
897
897
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
898
898
|
type: z.ZodLiteral<"kind">;
|
|
899
899
|
resourceKind: z.ZodEnum<{
|
|
900
|
-
volume: "volume";
|
|
901
900
|
warehouse: "warehouse";
|
|
902
901
|
genie_space: "genie_space";
|
|
903
902
|
postgres_project: "postgres_project";
|
|
904
903
|
postgres_branch: "postgres_branch";
|
|
905
904
|
postgres_database: "postgres_database";
|
|
905
|
+
volume: "volume";
|
|
906
906
|
}>;
|
|
907
907
|
select: z.ZodOptional<z.ZodString>;
|
|
908
908
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -936,12 +936,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
936
936
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
937
937
|
type: z.ZodLiteral<"kind">;
|
|
938
938
|
resourceKind: z.ZodEnum<{
|
|
939
|
-
volume: "volume";
|
|
940
939
|
warehouse: "warehouse";
|
|
941
940
|
genie_space: "genie_space";
|
|
942
941
|
postgres_project: "postgres_project";
|
|
943
942
|
postgres_branch: "postgres_branch";
|
|
944
943
|
postgres_database: "postgres_database";
|
|
944
|
+
volume: "volume";
|
|
945
945
|
}>;
|
|
946
946
|
select: z.ZodOptional<z.ZodString>;
|
|
947
947
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -959,10 +959,10 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
959
959
|
type: z.ZodLiteral<"postgres">;
|
|
960
960
|
}, z.core.$strict>, z.ZodObject<{
|
|
961
961
|
permission: z.ZodEnum<{
|
|
962
|
-
CAN_EDIT: "CAN_EDIT";
|
|
963
962
|
CAN_VIEW: "CAN_VIEW";
|
|
964
963
|
CAN_MANAGE: "CAN_MANAGE";
|
|
965
964
|
CAN_RUN: "CAN_RUN";
|
|
965
|
+
CAN_EDIT: "CAN_EDIT";
|
|
966
966
|
}>;
|
|
967
967
|
alias: z.ZodString;
|
|
968
968
|
resourceKey: z.ZodString;
|
|
@@ -978,12 +978,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
978
978
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
979
979
|
type: z.ZodLiteral<"kind">;
|
|
980
980
|
resourceKind: z.ZodEnum<{
|
|
981
|
-
volume: "volume";
|
|
982
981
|
warehouse: "warehouse";
|
|
983
982
|
genie_space: "genie_space";
|
|
984
983
|
postgres_project: "postgres_project";
|
|
985
984
|
postgres_branch: "postgres_branch";
|
|
986
985
|
postgres_database: "postgres_database";
|
|
986
|
+
volume: "volume";
|
|
987
987
|
}>;
|
|
988
988
|
select: z.ZodOptional<z.ZodString>;
|
|
989
989
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -1001,8 +1001,8 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
1001
1001
|
type: z.ZodLiteral<"genie_space">;
|
|
1002
1002
|
}, z.core.$strict>, z.ZodObject<{
|
|
1003
1003
|
permission: z.ZodEnum<{
|
|
1004
|
-
CAN_EDIT: "CAN_EDIT";
|
|
1005
1004
|
CAN_MANAGE: "CAN_MANAGE";
|
|
1005
|
+
CAN_EDIT: "CAN_EDIT";
|
|
1006
1006
|
CAN_READ: "CAN_READ";
|
|
1007
1007
|
}>;
|
|
1008
1008
|
alias: z.ZodString;
|
|
@@ -1019,12 +1019,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
1019
1019
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1020
1020
|
type: z.ZodLiteral<"kind">;
|
|
1021
1021
|
resourceKind: z.ZodEnum<{
|
|
1022
|
-
volume: "volume";
|
|
1023
1022
|
warehouse: "warehouse";
|
|
1024
1023
|
genie_space: "genie_space";
|
|
1025
1024
|
postgres_project: "postgres_project";
|
|
1026
1025
|
postgres_branch: "postgres_branch";
|
|
1027
1026
|
postgres_database: "postgres_database";
|
|
1027
|
+
volume: "volume";
|
|
1028
1028
|
}>;
|
|
1029
1029
|
select: z.ZodOptional<z.ZodString>;
|
|
1030
1030
|
display: z.ZodOptional<z.ZodString>;
|
|
@@ -1058,12 +1058,12 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
1058
1058
|
discovery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1059
1059
|
type: z.ZodLiteral<"kind">;
|
|
1060
1060
|
resourceKind: z.ZodEnum<{
|
|
1061
|
-
volume: "volume";
|
|
1062
1061
|
warehouse: "warehouse";
|
|
1063
1062
|
genie_space: "genie_space";
|
|
1064
1063
|
postgres_project: "postgres_project";
|
|
1065
1064
|
postgres_branch: "postgres_branch";
|
|
1066
1065
|
postgres_database: "postgres_database";
|
|
1066
|
+
volume: "volume";
|
|
1067
1067
|
}>;
|
|
1068
1068
|
select: z.ZodOptional<z.ZodString>;
|
|
1069
1069
|
display: z.ZodOptional<z.ZodString>;
|
package/dist/telemetry/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { normalizeTelemetryOptions } from "./config.js";
|
|
|
2
2
|
import { instrumentations } from "./instrumentations.js";
|
|
3
3
|
import { TelemetryProvider } from "./telemetry-provider.js";
|
|
4
4
|
import { TelemetryManager } from "./telemetry-manager.js";
|
|
5
|
-
import { SpanKind, SpanStatusCode } from "@opentelemetry/api";
|
|
5
|
+
import { SpanKind as SpanKind$1, SpanStatusCode } from "@opentelemetry/api";
|
|
6
6
|
import { SeverityNumber as SeverityNumber$1 } from "@opentelemetry/api-logs";
|
|
7
7
|
|
|
8
|
-
export { SeverityNumber$1 as SeverityNumber, SpanKind, SpanStatusCode };
|
|
8
|
+
export { SeverityNumber$1 as SeverityNumber, SpanKind$1 as SpanKind, SpanStatusCode };
|
|
@@ -1,24 +1,49 @@
|
|
|
1
1
|
import { createLogger } from "../logging/logger.js";
|
|
2
2
|
import { TelemetryProvider } from "./telemetry-provider.js";
|
|
3
3
|
import { AppKitSampler } from "./trace-sampler.js";
|
|
4
|
+
import { metrics } from "@opentelemetry/api";
|
|
5
|
+
import { logs } from "@opentelemetry/api-logs";
|
|
4
6
|
import { getNodeAutoInstrumentations } from "@opentelemetry/auto-instrumentations-node";
|
|
5
7
|
import { OTLPLogExporter } from "@opentelemetry/exporter-logs-otlp-proto";
|
|
6
8
|
import { OTLPMetricExporter } from "@opentelemetry/exporter-metrics-otlp-proto";
|
|
7
9
|
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-proto";
|
|
8
10
|
import { registerInstrumentations } from "@opentelemetry/instrumentation";
|
|
9
11
|
import { detectResources, envDetector, hostDetector, processDetector, resourceFromAttributes } from "@opentelemetry/resources";
|
|
10
|
-
import { BatchLogRecordProcessor } from "@opentelemetry/sdk-logs";
|
|
11
|
-
import { PeriodicExportingMetricReader } from "@opentelemetry/sdk-metrics";
|
|
12
|
-
import {
|
|
12
|
+
import { BatchLogRecordProcessor, LoggerProvider } from "@opentelemetry/sdk-logs";
|
|
13
|
+
import { MeterProvider, PeriodicExportingMetricReader } from "@opentelemetry/sdk-metrics";
|
|
14
|
+
import { BatchSpanProcessor } from "@opentelemetry/sdk-trace-base";
|
|
15
|
+
import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node";
|
|
13
16
|
import { ATTR_SERVICE_NAME, ATTR_SERVICE_VERSION } from "@opentelemetry/semantic-conventions";
|
|
14
17
|
|
|
15
18
|
//#region src/telemetry/telemetry-manager.ts
|
|
16
19
|
const logger = createLogger("telemetry");
|
|
20
|
+
/**
|
|
21
|
+
* Owns the app's OpenTelemetry providers, split into two phases so plugins can
|
|
22
|
+
* contribute trace span processors before the tracer provider is built.
|
|
23
|
+
*
|
|
24
|
+
* - `initialize()` runs at app bootstrap, before plugin setup. It registers the
|
|
25
|
+
* meter and logger providers eagerly, because OTel's metrics API has no lazy
|
|
26
|
+
* proxy: a counter/histogram bound against the NoOp meter (as every connector
|
|
27
|
+
* and the cache do in their constructors) stays NoOp for the process lifetime.
|
|
28
|
+
* It does NOT register a tracer provider.
|
|
29
|
+
* - `registerSpanProcessor()` is called by plugins during `setup()` to add a
|
|
30
|
+
* span processor (e.g. an MLflow exporter) to the not-yet-built tracer.
|
|
31
|
+
* - `start()` runs after all plugin `setup()` completes. It builds the single
|
|
32
|
+
* global tracer provider with the OTLP processor (if configured) plus every
|
|
33
|
+
* contributed processor. Deferring is safe for traces: OTel's ProxyTracer
|
|
34
|
+
* rebinds tracers obtained before registration, and no span is emitted during
|
|
35
|
+
* setup.
|
|
36
|
+
*/
|
|
17
37
|
var TelemetryManager = class TelemetryManager {
|
|
18
38
|
static DEFAULT_EXPORT_INTERVAL_MS = 1e4;
|
|
19
39
|
static DEFAULT_FALLBACK_APP_NAME = "databricks-app";
|
|
20
40
|
static instance;
|
|
21
|
-
|
|
41
|
+
resource;
|
|
42
|
+
meterProvider;
|
|
43
|
+
loggerProvider;
|
|
44
|
+
tracerProvider;
|
|
45
|
+
spanProcessors = [];
|
|
46
|
+
started = false;
|
|
22
47
|
shutdownPromise;
|
|
23
48
|
/**
|
|
24
49
|
* Create a scoped telemetry provider for a specific plugin.
|
|
@@ -38,29 +63,84 @@ var TelemetryManager = class TelemetryManager {
|
|
|
38
63
|
static initialize(config = {}) {
|
|
39
64
|
TelemetryManager.getInstance()._initialize(config);
|
|
40
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Contribute a span processor to the not-yet-built tracer provider. Called by
|
|
68
|
+
* plugins during `setup()`. No-op with a warning once `start()` has run, since
|
|
69
|
+
* a started provider's processors are immutable in OTel JS 2.x.
|
|
70
|
+
*/
|
|
71
|
+
static registerSpanProcessor(processor) {
|
|
72
|
+
TelemetryManager.getInstance()._registerSpanProcessor(processor);
|
|
73
|
+
}
|
|
74
|
+
_registerSpanProcessor(processor) {
|
|
75
|
+
if (this.started) {
|
|
76
|
+
logger.warn("registerSpanProcessor called after start(); processor ignored. Contribute span processors during plugin setup().");
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
this.spanProcessors.push(processor);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Phase 1: register the meter and logger providers eagerly (before plugin
|
|
83
|
+
* setup), so metric instruments bound in connector/cache constructors attach
|
|
84
|
+
* to real meters. The tracer provider is deferred to `start()`.
|
|
85
|
+
*
|
|
86
|
+
* When no OTLP endpoint is configured, meter/logger registration is skipped;
|
|
87
|
+
* a contributed span processor can still bring up tracing in `start()`.
|
|
88
|
+
*/
|
|
41
89
|
_initialize(config) {
|
|
42
|
-
if (this.
|
|
90
|
+
if (this.resource) return;
|
|
91
|
+
this.resource = this.createResource(config);
|
|
43
92
|
if (!process.env.OTEL_EXPORTER_OTLP_ENDPOINT) return;
|
|
44
93
|
try {
|
|
45
|
-
this.
|
|
46
|
-
resource: this.
|
|
47
|
-
|
|
48
|
-
sampler: new AppKitSampler(),
|
|
49
|
-
traceExporter: new OTLPTraceExporter({ headers: config.headers }),
|
|
50
|
-
metricReaders: [new PeriodicExportingMetricReader({
|
|
94
|
+
this.meterProvider = new MeterProvider({
|
|
95
|
+
resource: this.resource,
|
|
96
|
+
readers: [new PeriodicExportingMetricReader({
|
|
51
97
|
exporter: new OTLPMetricExporter({ headers: config.headers }),
|
|
52
98
|
exportIntervalMillis: config.exportIntervalMs || TelemetryManager.DEFAULT_EXPORT_INTERVAL_MS
|
|
53
|
-
})]
|
|
54
|
-
|
|
55
|
-
|
|
99
|
+
})]
|
|
100
|
+
});
|
|
101
|
+
metrics.setGlobalMeterProvider(this.meterProvider);
|
|
102
|
+
this.loggerProvider = new LoggerProvider({
|
|
103
|
+
resource: this.resource,
|
|
104
|
+
processors: [new BatchLogRecordProcessor(new OTLPLogExporter({ headers: config.headers }))]
|
|
56
105
|
});
|
|
57
|
-
this.
|
|
58
|
-
|
|
106
|
+
logs.setGlobalLoggerProvider(this.loggerProvider);
|
|
107
|
+
this.spanProcessors.push(new BatchSpanProcessor(new OTLPTraceExporter({ headers: config.headers })));
|
|
108
|
+
this.registerInstrumentations(this.getDefaultInstrumentations());
|
|
109
|
+
logger.debug("Meter/logger providers initialized");
|
|
59
110
|
} catch (error) {
|
|
60
111
|
logger.error("Failed to initialize: %O", error);
|
|
61
112
|
}
|
|
62
113
|
}
|
|
63
114
|
/**
|
|
115
|
+
* Phase 2: build and register the global tracer provider. Called by core
|
|
116
|
+
* after every plugin's `setup()` completes, so all contributed span
|
|
117
|
+
* processors are known. No-op when nothing needs tracing (no OTLP endpoint
|
|
118
|
+
* and no contributed processor), preserving "no telemetry unless configured".
|
|
119
|
+
*
|
|
120
|
+
* `NodeTracerProvider.register()` installs the async-hooks context manager and
|
|
121
|
+
* W3C propagators — the same wiring `NodeSDK.start()` did — so span nesting
|
|
122
|
+
* across awaits is preserved.
|
|
123
|
+
*/
|
|
124
|
+
static start() {
|
|
125
|
+
TelemetryManager.getInstance()._start();
|
|
126
|
+
}
|
|
127
|
+
_start() {
|
|
128
|
+
if (this.started) return;
|
|
129
|
+
this.started = true;
|
|
130
|
+
if (this.spanProcessors.length === 0) return;
|
|
131
|
+
try {
|
|
132
|
+
this.tracerProvider = new NodeTracerProvider({
|
|
133
|
+
resource: this.resource,
|
|
134
|
+
sampler: new AppKitSampler(),
|
|
135
|
+
spanProcessors: this.spanProcessors
|
|
136
|
+
});
|
|
137
|
+
this.tracerProvider.register();
|
|
138
|
+
logger.debug("Tracer provider started with %d span processor(s)", this.spanProcessors.length);
|
|
139
|
+
} catch (error) {
|
|
140
|
+
logger.error("Failed to start tracer provider: %O", error);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
64
144
|
* Register OpenTelemetry instrumentations.
|
|
65
145
|
* Can be called at any time, but recommended to call in plugin constructor.
|
|
66
146
|
* @param instrumentations - Array of OpenTelemetry instrumentations to register
|
|
@@ -91,23 +171,31 @@ var TelemetryManager = class TelemetryManager {
|
|
|
91
171
|
})];
|
|
92
172
|
}
|
|
93
173
|
/**
|
|
94
|
-
* Flush and shut down the
|
|
174
|
+
* Flush and shut down the tracer, meter, and logger providers.
|
|
95
175
|
*
|
|
96
|
-
* Idempotent: the
|
|
176
|
+
* Idempotent: the provider references are cleared synchronously and concurrent
|
|
97
177
|
* or repeated calls await the same in-flight flush. Awaited by the core
|
|
98
178
|
* lifecycle manager during graceful shutdown — that manager owns the
|
|
99
179
|
* process signal handlers, so telemetry no longer registers its own.
|
|
100
180
|
*/
|
|
101
181
|
async shutdown() {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
this.
|
|
182
|
+
const providers = [
|
|
183
|
+
this.tracerProvider,
|
|
184
|
+
this.meterProvider,
|
|
185
|
+
this.loggerProvider
|
|
186
|
+
].filter((p) => p !== void 0);
|
|
187
|
+
if (providers.length > 0) {
|
|
188
|
+
this.tracerProvider = void 0;
|
|
189
|
+
this.meterProvider = void 0;
|
|
190
|
+
this.loggerProvider = void 0;
|
|
105
191
|
this.shutdownPromise = (async () => {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
192
|
+
await Promise.all(providers.map(async (provider) => {
|
|
193
|
+
try {
|
|
194
|
+
await provider.shutdown();
|
|
195
|
+
} catch (error) {
|
|
196
|
+
logger.error("Error shutting down: %O", error);
|
|
197
|
+
}
|
|
198
|
+
}));
|
|
111
199
|
})();
|
|
112
200
|
}
|
|
113
201
|
return this.shutdownPromise;
|