@finos/legend-application-studio 28.21.45 → 28.21.46

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 (138) hide show
  1. package/lib/__lib__/LegendStudioEvent.d.ts +55 -1
  2. package/lib/__lib__/LegendStudioEvent.d.ts.map +1 -1
  3. package/lib/__lib__/LegendStudioEvent.js +77 -0
  4. package/lib/__lib__/LegendStudioEvent.js.map +1 -1
  5. package/lib/__lib__/LegendStudioTelemetryHelper.d.ts +491 -1
  6. package/lib/__lib__/LegendStudioTelemetryHelper.d.ts.map +1 -1
  7. package/lib/__lib__/LegendStudioTelemetryHelper.js +594 -1
  8. package/lib/__lib__/LegendStudioTelemetryHelper.js.map +1 -1
  9. package/lib/components/editor/side-bar/WorkflowManager.d.ts.map +1 -1
  10. package/lib/components/editor/side-bar/WorkflowManager.js +15 -0
  11. package/lib/components/editor/side-bar/WorkflowManager.js.map +1 -1
  12. package/lib/index.css +1 -1
  13. package/lib/index.d.ts +1 -1
  14. package/lib/index.d.ts.map +1 -1
  15. package/lib/index.js +1 -1
  16. package/lib/index.js.map +1 -1
  17. package/lib/package.json +1 -1
  18. package/lib/stores/editor/EditorGraphState.d.ts.map +1 -1
  19. package/lib/stores/editor/EditorGraphState.js +17 -1
  20. package/lib/stores/editor/EditorGraphState.js.map +1 -1
  21. package/lib/stores/editor/EditorStore.d.ts.map +1 -1
  22. package/lib/stores/editor/EditorStore.js +10 -0
  23. package/lib/stores/editor/EditorStore.js.map +1 -1
  24. package/lib/stores/editor/EditorTabManagerState.d.ts +18 -1
  25. package/lib/stores/editor/EditorTabManagerState.d.ts.map +1 -1
  26. package/lib/stores/editor/EditorTabManagerState.js +90 -1
  27. package/lib/stores/editor/EditorTabManagerState.js.map +1 -1
  28. package/lib/stores/editor/EditorTabTelemetryHelper.d.ts +31 -0
  29. package/lib/stores/editor/EditorTabTelemetryHelper.d.ts.map +1 -0
  30. package/lib/stores/editor/EditorTabTelemetryHelper.js +55 -0
  31. package/lib/stores/editor/EditorTabTelemetryHelper.js.map +1 -0
  32. package/lib/stores/editor/GraphEditFormModeState.d.ts.map +1 -1
  33. package/lib/stores/editor/GraphEditFormModeState.js +11 -1
  34. package/lib/stores/editor/GraphEditFormModeState.js.map +1 -1
  35. package/lib/stores/editor/editor-state/GraphGenerationState.d.ts.map +1 -1
  36. package/lib/stores/editor/editor-state/GraphGenerationState.js +25 -0
  37. package/lib/stores/editor/editor-state/GraphGenerationState.js.map +1 -1
  38. package/lib/stores/editor/editor-state/ModelImporterState.d.ts.map +1 -1
  39. package/lib/stores/editor/editor-state/ModelImporterState.js +2 -1
  40. package/lib/stores/editor/editor-state/ModelImporterState.js.map +1 -1
  41. package/lib/stores/editor/editor-state/element-editor-state/ElementExternalFormatGenerationState.d.ts.map +1 -1
  42. package/lib/stores/editor/editor-state/element-editor-state/ElementExternalFormatGenerationState.js +14 -0
  43. package/lib/stores/editor/editor-state/element-editor-state/ElementExternalFormatGenerationState.js.map +1 -1
  44. package/lib/stores/editor/editor-state/element-editor-state/availability/testable/AvailabilityTestableState.d.ts +5 -0
  45. package/lib/stores/editor/editor-state/element-editor-state/availability/testable/AvailabilityTestableState.d.ts.map +1 -1
  46. package/lib/stores/editor/editor-state/element-editor-state/availability/testable/AvailabilityTestableState.js +13 -0
  47. package/lib/stores/editor/editor-state/element-editor-state/availability/testable/AvailabilityTestableState.js.map +1 -1
  48. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.d.ts +5 -0
  49. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.d.ts.map +1 -1
  50. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.js +13 -0
  51. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.js.map +1 -1
  52. package/lib/stores/editor/editor-state/element-editor-state/function-activator/testable/FunctionTestableState.d.ts +7 -0
  53. package/lib/stores/editor/editor-state/element-editor-state/function-activator/testable/FunctionTestableState.d.ts.map +1 -1
  54. package/lib/stores/editor/editor-state/element-editor-state/function-activator/testable/FunctionTestableState.js +19 -0
  55. package/lib/stores/editor/editor-state/element-editor-state/function-activator/testable/FunctionTestableState.js.map +1 -1
  56. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestTestableState.d.ts +5 -0
  57. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestTestableState.d.ts.map +1 -1
  58. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestTestableState.js +13 -0
  59. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestTestableState.js.map +1 -1
  60. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.d.ts +7 -0
  61. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.d.ts.map +1 -1
  62. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js +34 -0
  63. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js.map +1 -1
  64. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceRegistrationState.d.ts.map +1 -1
  65. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceRegistrationState.js +29 -0
  66. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceRegistrationState.js.map +1 -1
  67. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts.map +1 -1
  68. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.js +2 -0
  69. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.js.map +1 -1
  70. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.d.ts +3 -0
  71. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.d.ts.map +1 -1
  72. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js +7 -0
  73. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js.map +1 -1
  74. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.d.ts.map +1 -1
  75. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.js +46 -17
  76. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.js.map +1 -1
  77. package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.d.ts +7 -0
  78. package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.d.ts.map +1 -1
  79. package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.js +110 -16
  80. package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.js.map +1 -1
  81. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.d.ts +2 -1
  82. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.d.ts.map +1 -1
  83. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js +10 -4
  84. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js.map +1 -1
  85. package/lib/stores/editor/sidebar-state/BulkServiceRegistrationState.d.ts.map +1 -1
  86. package/lib/stores/editor/sidebar-state/BulkServiceRegistrationState.js +11 -0
  87. package/lib/stores/editor/sidebar-state/BulkServiceRegistrationState.js.map +1 -1
  88. package/lib/stores/editor/sidebar-state/ProjectOverviewState.d.ts.map +1 -1
  89. package/lib/stores/editor/sidebar-state/ProjectOverviewState.js +51 -0
  90. package/lib/stores/editor/sidebar-state/ProjectOverviewState.js.map +1 -1
  91. package/lib/stores/editor/sidebar-state/WorkflowManagerState.d.ts +14 -0
  92. package/lib/stores/editor/sidebar-state/WorkflowManagerState.d.ts.map +1 -1
  93. package/lib/stores/editor/sidebar-state/WorkflowManagerState.js +141 -26
  94. package/lib/stores/editor/sidebar-state/WorkflowManagerState.js.map +1 -1
  95. package/lib/stores/editor/sidebar-state/WorkspaceReviewState.d.ts.map +1 -1
  96. package/lib/stores/editor/sidebar-state/WorkspaceReviewState.js +41 -0
  97. package/lib/stores/editor/sidebar-state/WorkspaceReviewState.js.map +1 -1
  98. package/lib/stores/editor/sidebar-state/testable/GlobalTestRunnerState.d.ts.map +1 -1
  99. package/lib/stores/editor/sidebar-state/testable/GlobalTestRunnerState.js +71 -9
  100. package/lib/stores/editor/sidebar-state/testable/GlobalTestRunnerState.js.map +1 -1
  101. package/lib/stores/project-reviewer/ProjectReviewerStore.d.ts.map +1 -1
  102. package/lib/stores/project-reviewer/ProjectReviewerStore.js +45 -0
  103. package/lib/stores/project-reviewer/ProjectReviewerStore.js.map +1 -1
  104. package/lib/stores/workspace-setup/WorkspaceSetupStore.d.ts.map +1 -1
  105. package/lib/stores/workspace-setup/WorkspaceSetupStore.js +48 -4
  106. package/lib/stores/workspace-setup/WorkspaceSetupStore.js.map +1 -1
  107. package/package.json +9 -9
  108. package/src/__lib__/LegendStudioEvent.ts +88 -0
  109. package/src/__lib__/LegendStudioTelemetryHelper.ts +1389 -204
  110. package/src/components/editor/side-bar/WorkflowManager.tsx +24 -0
  111. package/src/index.ts +4 -1
  112. package/src/stores/editor/EditorGraphState.ts +30 -1
  113. package/src/stores/editor/EditorStore.ts +19 -0
  114. package/src/stores/editor/EditorTabManagerState.ts +128 -1
  115. package/src/stores/editor/EditorTabTelemetryHelper.ts +70 -0
  116. package/src/stores/editor/GraphEditFormModeState.ts +19 -1
  117. package/src/stores/editor/editor-state/GraphGenerationState.ts +53 -0
  118. package/src/stores/editor/editor-state/ModelImporterState.ts +2 -0
  119. package/src/stores/editor/editor-state/element-editor-state/ElementExternalFormatGenerationState.ts +30 -0
  120. package/src/stores/editor/editor-state/element-editor-state/availability/testable/AvailabilityTestableState.ts +17 -0
  121. package/src/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.ts +17 -0
  122. package/src/stores/editor/editor-state/element-editor-state/function-activator/testable/FunctionTestableState.ts +25 -0
  123. package/src/stores/editor/editor-state/element-editor-state/ingest/IngestTestableState.ts +17 -0
  124. package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.ts +57 -0
  125. package/src/stores/editor/editor-state/element-editor-state/service/ServiceRegistrationState.ts +56 -0
  126. package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts +10 -0
  127. package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.ts +9 -0
  128. package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.ts +78 -21
  129. package/src/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.ts +205 -18
  130. package/src/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.ts +38 -3
  131. package/src/stores/editor/sidebar-state/BulkServiceRegistrationState.ts +27 -0
  132. package/src/stores/editor/sidebar-state/ProjectOverviewState.ts +114 -0
  133. package/src/stores/editor/sidebar-state/WorkflowManagerState.ts +259 -29
  134. package/src/stores/editor/sidebar-state/WorkspaceReviewState.ts +84 -0
  135. package/src/stores/editor/sidebar-state/testable/GlobalTestRunnerState.ts +124 -17
  136. package/src/stores/project-reviewer/ProjectReviewerStore.ts +97 -0
  137. package/src/stores/workspace-setup/WorkspaceSetupStore.ts +87 -4
  138. package/tsconfig.json +1 -0
@@ -15,9 +15,22 @@
15
15
  */
16
16
 
17
17
  import {
18
+ Availability,
19
+ DataProduct,
20
+ FunctionActivator,
18
21
  GRAPH_MANAGER_EVENT,
22
+ IngestDefinition,
23
+ Mapping,
24
+ MultiExecutionServiceTestResult,
25
+ PackageableElement,
26
+ Service,
27
+ TestError,
28
+ TestExecuted,
29
+ TestExecutionStatus,
19
30
  type GraphInitializationReport,
20
31
  type GraphManagerOperationReport,
32
+ type TestResult,
33
+ type Testable,
21
34
  } from '@finos/legend-graph';
22
35
  import {
23
36
  APPLICATION_EVENT,
@@ -158,6 +171,437 @@ export enum GRAPH_EDITOR_MODE_LABEL {
158
171
  STRICT_TEXT = 'strict-text',
159
172
  }
160
173
 
174
+ export enum FORM_MODE_COMPILATION_ERROR_KIND {
175
+ COMPILATION = 'compilation',
176
+ ENGINE = 'engine',
177
+ }
178
+
179
+ export enum GRAPH_INITIALIZATION_ERROR_KIND {
180
+ DEPENDENCY = 'dependency',
181
+ DESERIALIZATION = 'deserialization',
182
+ NETWORK = 'network',
183
+ OTHER = 'other',
184
+ }
185
+
186
+ export enum SERVICE_REGISTRATION_TRIGGER {
187
+ SINGLE = 'single',
188
+ BULK = 'bulk',
189
+ SERVICE_QUERY_EDITOR = 'service-query-editor',
190
+ }
191
+
192
+ export type ServiceRegistrationCommonData = {
193
+ trigger: SERVICE_REGISTRATION_TRIGGER;
194
+ executionMode: string | undefined;
195
+ serviceCount: number;
196
+ activatePostRegistration: boolean;
197
+ };
198
+
199
+ export type ServiceRegistrationCheckCommonData = {
200
+ servicePath: string;
201
+ envCount: number;
202
+ };
203
+
204
+ /**
205
+ * Discriminates the entry-point of `editor.generation.*` events.
206
+ * - `global`: sidebar "Generate" action, spans the whole project's generation spec
207
+ * (models + artifacts).
208
+ * - `element-schema`: per-element external-format schema regeneration from an
209
+ * element editor's "Generate" button.
210
+ */
211
+ export enum GENERATION_MODE {
212
+ GLOBAL = 'global',
213
+ ELEMENT_SCHEMA = 'element-schema',
214
+ }
215
+
216
+ export type GenerationCommonData = {
217
+ mode: GENERATION_MODE;
218
+ elementPath?: string | undefined;
219
+ generationType?: string | undefined;
220
+ /**
221
+ * Only meaningful for `global` runs — reflects whether artifact generation
222
+ * was enabled at the time the run was launched.
223
+ */
224
+ enableArtifactGeneration?: boolean | undefined;
225
+ };
226
+
227
+ /**
228
+ * High-level bucket for a Studio tab so dashboards can slice tab activity
229
+ * across element editors vs. sidecar tabs (diff viewers, artifact viewers,
230
+ * model importer, etc.) without depending on the element metamodel.
231
+ */
232
+ export enum EDITOR_TAB_KIND {
233
+ ELEMENT = 'element',
234
+ ENTITY_DIFF = 'entity-diff',
235
+ ARTIFACT_GENERATION = 'artifact-generation',
236
+ MODEL_IMPORTER = 'model-importer',
237
+ PROJECT_CONFIGURATION = 'project-configuration',
238
+ END_TO_END_WORKFLOW = 'end-to-end-workflow',
239
+ OTHER = 'other',
240
+ }
241
+
242
+ /**
243
+ * Sub-bucket for `EDITOR_TAB_KIND.ELEMENT` tabs — carried as the raw
244
+ * `PACKAGEABLE_ELEMENT_TYPE` string (e.g. `'CLASS'`, `'MAPPING'`,
245
+ * `'SERVICE'`, `'BETA_DATA_PRODUCT'`) resolved by
246
+ * `EditorGraphState.getPackageableElementType`. That classifier is
247
+ * plugin-aware, so extension-provided element kinds (DataSpace, Diagram,
248
+ * DataQuality, ...) come through with their extension-declared labels
249
+ * rather than falling into a generic `other` bucket.
250
+ */
251
+ export type EditorElementKind = string;
252
+
253
+ export enum EDITOR_TAB_OPEN_TRIGGER {
254
+ /** Default when the caller did not surface intent. */
255
+ PROGRAMMATIC = 'programmatic',
256
+ /** Tab was recreated after graph rebuild via cachedTabs recovery. */
257
+ RESTORE = 'restore',
258
+ }
259
+
260
+ export enum EDITOR_TAB_CLOSE_TRIGGER {
261
+ /** User clicked the "x" on the tab, or middle-clicked the tab strip. */
262
+ USER_CLOSE = 'user-close',
263
+ /** User invoked "Close Others" from the tab context menu. */
264
+ CLOSE_OTHERS = 'close-others',
265
+ /** User invoked "Close All" from the tab context menu. */
266
+ CLOSE_ALL = 'close-all',
267
+ /** Tabs were flushed as part of a graph rebuild (cacheAndClose). */
268
+ NAVIGATE_AWAY = 'navigate-away',
269
+ /** Programmatic close from a store method. */
270
+ PROGRAMMATIC = 'programmatic',
271
+ }
272
+
273
+ export type EditorTabCommonData = {
274
+ tabKind: EDITOR_TAB_KIND;
275
+ elementKind?: EditorElementKind | undefined;
276
+ elementPath?: string | undefined;
277
+ };
278
+
279
+ export enum WORKFLOW_MANAGER_SCOPE {
280
+ WORKSPACE = 'workspace',
281
+ PROJECT = 'project',
282
+ PROJECT_VERSION = 'project-version',
283
+ }
284
+
285
+ export enum WORKFLOW_MANAGER_JOB_ACTION {
286
+ RETRY = 'retry',
287
+ CANCEL = 'cancel',
288
+ RUN_MANUAL = 'run-manual',
289
+ }
290
+
291
+ export type WorkflowManagerStatusBreakdown = Record<string, number>;
292
+
293
+ /**
294
+ * SDLC review actions. `create` only fires from the author side;
295
+ * `approve` / `reopen` fire only from the reviewer side; `commit` and
296
+ * `close` fire from both.
297
+ */
298
+ export enum SDLC_REVIEW_ACTION {
299
+ CREATE = 'create',
300
+ COMMIT = 'commit',
301
+ CLOSE = 'close',
302
+ REOPEN = 'reopen',
303
+ APPROVE = 'approve',
304
+ }
305
+
306
+ /**
307
+ * Which side of the review the event fires from — the workspace author
308
+ * committing/closing their own review, or a reviewer approving / committing
309
+ * / reopening / closing someone else's review.
310
+ */
311
+ export enum SDLC_REVIEW_ROLE {
312
+ AUTHOR = 'author',
313
+ REVIEWER = 'reviewer',
314
+ }
315
+
316
+ type SdlcReviewIdentityData = {
317
+ action: SDLC_REVIEW_ACTION;
318
+ role: SDLC_REVIEW_ROLE;
319
+ projectId: string;
320
+ patchReleaseVersionId?: string | undefined;
321
+ };
322
+
323
+ export type SdlcReviewActionLaunchData = SdlcReviewIdentityData & {
324
+ // Undefined on `create` launches (no id yet); populated for the other
325
+ // actions.
326
+ reviewId?: string | undefined;
327
+ };
328
+
329
+ export type SdlcReviewActionSuccessData = SdlcReviewIdentityData & {
330
+ reviewId: string;
331
+ durationMs: number;
332
+ };
333
+
334
+ export type SdlcReviewActionFailureData = SdlcReviewIdentityData & {
335
+ // Undefined on `create` failures (the server may have failed before
336
+ // assigning an id); populated for the other actions.
337
+ reviewId?: string | undefined;
338
+ errorMessage: string;
339
+ };
340
+
341
+ /**
342
+ * Workspace setup screen actions — user-triggered writes from the setup /
343
+ * project picker route. Structured replacement for the
344
+ * WORKSPACE_SETUP_FAILURE bucket plus previously-unlogged create-project
345
+ * and import-project flows.
346
+ */
347
+ export enum SETUP_ACTION {
348
+ CREATE_SANDBOX_PROJECT = 'create-sandbox-project',
349
+ CREATE_PROJECT = 'create-project',
350
+ IMPORT_PROJECT = 'import-project',
351
+ CREATE_WORKSPACE = 'create-workspace',
352
+ }
353
+
354
+ type SetupActionIdentityData = {
355
+ action: SETUP_ACTION;
356
+ // Populated for `create-workspace` (the caller passes the target project
357
+ // and workspace up front) and for `*` success events once the id is
358
+ // known; undefined otherwise.
359
+ projectId?: string | undefined;
360
+ // Only meaningful for `create-workspace` — USER / GROUP. Serialized as
361
+ // string so the enum value doesn't need to be re-exported here.
362
+ workspaceType?: string | undefined;
363
+ // Only meaningful for `create-workspace` — true when the workspace
364
+ // targets a patch branch rather than main.
365
+ hasPatchReleaseVersion?: boolean | undefined;
366
+ };
367
+
368
+ export type SetupActionLaunchData = SetupActionIdentityData;
369
+
370
+ export type SetupActionSuccessData = SetupActionIdentityData & {
371
+ durationMs: number;
372
+ };
373
+
374
+ export type SetupActionFailureData = SetupActionIdentityData & {
375
+ errorMessage: string;
376
+ };
377
+
378
+ /**
379
+ * Project configuration editor actions — user-triggered writes from the
380
+ * project configuration editor. Structured replacement for the
381
+ * SDLC_MANAGER_FAILURE bucket around config updates.
382
+ *
383
+ * The three actions map to the three top-level editor buttons; they all
384
+ * funnel through the same `updateProjectConfiguration` SDLC call, and the
385
+ * `action` field records which entry point the user came from.
386
+ */
387
+ export enum PROJECT_CONFIG_UPDATE_ACTION {
388
+ // "Update" button on the config editor: dependency add/remove, platform
389
+ // configurations, run-dependency-tests toggle.
390
+ UPDATE_CONFIGS = 'update-configs',
391
+ // "Upgrade to latest project structure" button.
392
+ UPDATE_TO_LATEST_STRUCTURE = 'update-to-latest-structure',
393
+ // "Change project type" (managed / embedded) toggle.
394
+ CHANGE_PROJECT_TYPE = 'change-project-type',
395
+ }
396
+
397
+ type ProjectConfigUpdateIdentityData = {
398
+ action: PROJECT_CONFIG_UPDATE_ACTION;
399
+ };
400
+
401
+ export type ProjectConfigUpdateLaunchData = ProjectConfigUpdateIdentityData;
402
+
403
+ export type ProjectConfigUpdateSuccessData = ProjectConfigUpdateIdentityData & {
404
+ durationMs: number;
405
+ };
406
+
407
+ export type ProjectConfigUpdateFailureData = ProjectConfigUpdateIdentityData & {
408
+ errorMessage: string;
409
+ };
410
+
411
+ /**
412
+ * Project overview sidebar SDLC writes — user-triggered actions from the
413
+ * project overview panel. Structured replacement for the
414
+ * SDLC_MANAGER_FAILURE bucket around ProjectOverviewState.
415
+ */
416
+ export enum PROJECT_OVERVIEW_ACTION {
417
+ // Delete another workspace from the overview list.
418
+ DELETE_WORKSPACE = 'delete-workspace',
419
+ // Edit project name / description / tags.
420
+ UPDATE_PROJECT = 'update-project',
421
+ // Cut a new release version (major / minor / patch semver).
422
+ CREATE_VERSION = 'create-version',
423
+ // Close out a patch branch and release it as a version.
424
+ RELEASE_PATCH = 'release-patch',
425
+ // Open a new patch branch (also creates the initial workspace on it).
426
+ CREATE_PATCH = 'create-patch',
427
+ }
428
+
429
+ type ProjectOverviewActionIdentityData = {
430
+ action: PROJECT_OVERVIEW_ACTION;
431
+ projectId: string;
432
+ // Only meaningful for `release-patch` (the patch being released) and for
433
+ // `create-patch` (the source version the patch branches from).
434
+ patchReleaseVersionId?: string | undefined;
435
+ // Only meaningful for `create-patch` (the workspace being created on the
436
+ // new patch branch) — USER / GROUP. Serialized as string so the enum
437
+ // value doesn't need to be re-exported here.
438
+ workspaceType?: string | undefined;
439
+ };
440
+
441
+ export type ProjectOverviewActionLaunchData = ProjectOverviewActionIdentityData;
442
+
443
+ export type ProjectOverviewActionSuccessData =
444
+ ProjectOverviewActionIdentityData & { durationMs: number };
445
+
446
+ export type ProjectOverviewActionFailureData =
447
+ ProjectOverviewActionIdentityData & { errorMessage: string };
448
+
449
+ /**
450
+ * Ad-hoc workspace creation from the editor bootstrap — fires when the
451
+ * user deep-links to a workspace that doesn't exist and accepts the
452
+ * "Create workspace" recovery prompt. Distinct from the setup screen's
453
+ * `SETUP_ACTION.CREATE_WORKSPACE` because it runs from a different
454
+ * surface (in-editor recovery, not the setup route) with its own
455
+ * error-handling and legacy log bucket (`WORKSPACE_SETUP_FAILURE`).
456
+ *
457
+ * No editor mode is active yet at this point, so `sourceInfo` is
458
+ * omitted — the payload carries `projectId`, `workspaceId`,
459
+ * `workspaceType`, and `hasPatchReleaseVersion` explicitly.
460
+ */
461
+ type SdlcWorkspaceCreateIdentityData = {
462
+ projectId: string;
463
+ workspaceId: string;
464
+ workspaceType: string;
465
+ hasPatchReleaseVersion: boolean;
466
+ };
467
+
468
+ export type SdlcWorkspaceCreateLaunchData = SdlcWorkspaceCreateIdentityData;
469
+
470
+ export type SdlcWorkspaceCreateSuccessData = SdlcWorkspaceCreateIdentityData & {
471
+ durationMs: number;
472
+ };
473
+
474
+ export type SdlcWorkspaceCreateFailureData = SdlcWorkspaceCreateIdentityData & {
475
+ errorMessage: string;
476
+ };
477
+
478
+ export enum SERVICE_TEST_SUITE_RUN_MODE {
479
+ RUN_SUITE = 'run-suite',
480
+ RUN_FAILING = 'run-failing',
481
+ }
482
+
483
+ export type ServiceTestSuiteRunCommonData = {
484
+ servicePath: string;
485
+ suiteId: string;
486
+ mode: SERVICE_TEST_SUITE_RUN_MODE;
487
+ testCount: number;
488
+ };
489
+
490
+ /**
491
+ * Categorises the element behind a `Testable` for the unified TESTABLE_RUN
492
+ * telemetry so downstream analytics can slice per element kind without
493
+ * relying on the element path.
494
+ */
495
+ export enum TESTABLE_KIND {
496
+ MAPPING = 'mapping',
497
+ DATA_PRODUCT = 'data-product',
498
+ INGEST = 'ingest',
499
+ FUNCTION_ACTIVATOR = 'function-activator',
500
+ AVAILABILITY = 'availability',
501
+ SERVICE = 'service',
502
+ OTHER = 'other',
503
+ }
504
+
505
+ /**
506
+ * Which kind of run was invoked from the testable editors. This mirrors the
507
+ * distinct UI actions surfaced to the user (run suite, run failing tests,
508
+ * run entire testable, run all failing suites).
509
+ */
510
+ export enum TESTABLE_RUN_MODE {
511
+ RUN_SUITE = 'run-suite',
512
+ RUN_FAILING = 'run-failing',
513
+ RUN_TESTABLE = 'run-testable',
514
+ RUN_ALL_FAILING = 'run-all-failing',
515
+ RUN_TEST = 'run-test',
516
+ }
517
+
518
+ export type TestableRunCommonData = {
519
+ testableKind: TESTABLE_KIND;
520
+ testablePath: string;
521
+ suiteId: string | undefined;
522
+ mode: TESTABLE_RUN_MODE;
523
+ testCount: number;
524
+ };
525
+
526
+ /**
527
+ * Resolves the {@link TESTABLE_KIND} label for a testable element instance.
528
+ * Falls back to `OTHER` so telemetry never blocks on an unknown subtype.
529
+ */
530
+ export const getTestableKind = (testable: Testable): TESTABLE_KIND => {
531
+ if (testable instanceof Service) {
532
+ return TESTABLE_KIND.SERVICE;
533
+ }
534
+ if (testable instanceof Mapping) {
535
+ return TESTABLE_KIND.MAPPING;
536
+ }
537
+ if (testable instanceof DataProduct) {
538
+ return TESTABLE_KIND.DATA_PRODUCT;
539
+ }
540
+ if (testable instanceof IngestDefinition) {
541
+ return TESTABLE_KIND.INGEST;
542
+ }
543
+ if (testable instanceof FunctionActivator) {
544
+ return TESTABLE_KIND.FUNCTION_ACTIVATOR;
545
+ }
546
+ if (testable instanceof Availability) {
547
+ return TESTABLE_KIND.AVAILABILITY;
548
+ }
549
+ return TESTABLE_KIND.OTHER;
550
+ };
551
+
552
+ /**
553
+ * Reads `.path` from a testable, which all real packageable-element testables
554
+ * expose. Returns an empty string if unavailable to keep telemetry non-fatal.
555
+ */
556
+ export const getTestablePath = (testable: Testable): string =>
557
+ testable instanceof PackageableElement ? testable.path : '';
558
+
559
+ /**
560
+ * Bucketises test results into passed/failed/errored counts for the unified
561
+ * TESTABLE_RUN__SUCCESS payload. Handles {@link MultiExecutionServiceTestResult}
562
+ * by tallying each key-indexed sub-result so service multi-execution runs count
563
+ * every execution rather than the wrapper.
564
+ */
565
+ export const summarizeTestResults = (
566
+ results: TestResult[],
567
+ ): { passedCount: number; failedCount: number; erroredCount: number } => {
568
+ let passedCount = 0;
569
+ let failedCount = 0;
570
+ let erroredCount = 0;
571
+ const tally = (result: TestResult): void => {
572
+ if (result instanceof TestError) {
573
+ erroredCount += 1;
574
+ } else if (result instanceof TestExecuted) {
575
+ if (result.testExecutionStatus === TestExecutionStatus.PASS) {
576
+ passedCount += 1;
577
+ } else {
578
+ failedCount += 1;
579
+ }
580
+ }
581
+ };
582
+ for (const result of results) {
583
+ if (result instanceof MultiExecutionServiceTestResult) {
584
+ result.keyIndexedTestResults.forEach(tally);
585
+ } else {
586
+ tally(result);
587
+ }
588
+ }
589
+ return { passedCount, failedCount, erroredCount };
590
+ };
591
+
592
+ /**
593
+ * Scope of a global test runner invocation from the sidebar.
594
+ */
595
+ export enum GLOBAL_TEST_RUN_SCOPE {
596
+ ALL = 'all',
597
+ DEPENDENCIES = 'dependencies',
598
+ }
599
+
600
+ export type GlobalTestRunCommonData = {
601
+ scope: GLOBAL_TEST_RUN_SCOPE;
602
+ testableCount: number;
603
+ };
604
+
161
605
  export class LegendStudioTelemetryHelper {
162
606
  static logEvent_GraphCompilationLaunched(
163
607
  service: TelemetryService,
@@ -230,113 +674,295 @@ export class LegendStudioTelemetryHelper {
230
674
  });
231
675
  }
232
676
 
233
- // showcase manager
234
- static logEvent_ShowcaseManagerLaunch(
677
+ static logEvent_GraphInitializationLaunched(
235
678
  service: TelemetryService,
236
- data: ShowcaseMetadata_TelemetryData,
679
+ sourceInfo?: LegendSourceInfo | undefined,
237
680
  ): void {
238
- service.logEvent(LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_LAUNCH, data);
681
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.INITIALIZE_GRAPH__LAUNCH, {
682
+ sourceInfo,
683
+ });
239
684
  }
240
- static logEvent_ShowcaseManagerShowcaseProjectLaunch(
685
+
686
+ static logEvent_GraphInitializationFailure(
241
687
  service: TelemetryService,
242
- data: ShowcaseProject_TelemetryData,
688
+ sourceInfo: LegendSourceInfo | undefined,
689
+ data: {
690
+ errorKind: GRAPH_INITIALIZATION_ERROR_KIND;
691
+ errorMessage: string;
692
+ fallbackToTextMode: boolean;
693
+ },
243
694
  ): void {
244
- service.logEvent(
245
- LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_SHOWCASE_PROJECT_LAUNCH,
246
- data,
247
- );
695
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.INITIALIZE_GRAPH__FAILURE, {
696
+ sourceInfo,
697
+ ...data,
698
+ });
248
699
  }
249
- static logEvent_ShowcaseViewerLaunch(
700
+
701
+ static logEvent_GraphCompilationFailure(
250
702
  service: TelemetryService,
251
- data: ShowcaseProject_TelemetryData,
703
+ sourceInfo: LegendSourceInfo | undefined,
704
+ data: {
705
+ errorKind: FORM_MODE_COMPILATION_ERROR_KIND;
706
+ errorMessage: string;
707
+ fallbackToTextMode: boolean;
708
+ },
252
709
  ): void {
253
- service.logEvent(LEGEND_STUDIO_APP_EVENT.SHOWCASE_VIEWER_LAUNCH, data);
710
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.FORM_MODE_COMPILATION__FAILURE, {
711
+ sourceInfo,
712
+ ...data,
713
+ });
254
714
  }
255
715
 
256
- static logEvent_ShowcaseSearchInitiated(
716
+ static logEvent_TestDataGenerationFailure(
257
717
  service: TelemetryService,
258
- data: ShowcaseSearchInitiated_TelemetryData,
718
+ sourceInfo: LegendSourceInfo | undefined,
719
+ errorMessage: string,
259
720
  ): void {
260
- service.logEvent(
261
- LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_SEARCH__INITIATED,
262
- data,
263
- );
721
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TEST_DATA_GENERATION__FAILURE, {
722
+ sourceInfo,
723
+ errorMessage,
724
+ });
264
725
  }
265
726
 
266
- static logEvent_ShowcaseSearchCompleted(
727
+ // Service registration
728
+ static logEvent_ServiceRegistrationLaunched(
267
729
  service: TelemetryService,
268
- data: ShowcaseSearchCompleted_TelemetryData,
730
+ sourceInfo: LegendSourceInfo | undefined,
731
+ data: ServiceRegistrationCommonData,
269
732
  ): void {
270
- service.logEvent(
271
- LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_SEARCH__COMPLETED,
272
- data,
273
- );
733
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SERVICE_REGISTRATION_LAUNCH, {
734
+ sourceInfo,
735
+ ...data,
736
+ });
274
737
  }
275
738
 
276
- static logEvent_ShowcaseViewerClose(
739
+ static logEvent_ServiceRegistrationSucceeded(
277
740
  service: TelemetryService,
278
- data: ShowcaseViewerClose_TelemetryData,
741
+ sourceInfo: LegendSourceInfo | undefined,
742
+ data: ServiceRegistrationCommonData & { durationMs: number },
279
743
  ): void {
280
- service.logEvent(LEGEND_STUDIO_APP_EVENT.SHOWCASE_VIEWER_CLOSE, data);
744
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SERVICE_REGISTRATION_SUCCESS, {
745
+ sourceInfo,
746
+ ...data,
747
+ });
281
748
  }
282
749
 
283
- static logEvent_ShowcaseFeedbackSubmit(
750
+ static logEvent_ServiceRegistrationFailure(
284
751
  service: TelemetryService,
285
- data: ShowcaseFeedback_TelemetryData,
752
+ sourceInfo: LegendSourceInfo | undefined,
753
+ data: ServiceRegistrationCommonData & { errorMessage: string },
286
754
  ): void {
287
- service.logEvent(
288
- LEGEND_STUDIO_APP_EVENT.SHOWCASE_VIEWER_FEEDBACK__SUBMIT,
289
- data,
290
- );
755
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SERVICE_REGISTRATION_FAILURE, {
756
+ sourceInfo,
757
+ ...data,
758
+ });
291
759
  }
292
760
 
293
- static logEvent_ShowcaseManagerInitFailure(
761
+ // Service registration precheck (per-env "is this service already deployed?")
762
+ static logEvent_ServiceRegistrationCheckLaunched(
294
763
  service: TelemetryService,
295
- data: ShowcaseFailure_TelemetryData,
764
+ sourceInfo: LegendSourceInfo | undefined,
765
+ data: ServiceRegistrationCheckCommonData,
296
766
  ): void {
297
767
  service.logEvent(
298
- LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_INIT__FAILURE,
299
- data,
768
+ LEGEND_STUDIO_APP_EVENT.SERVICE_REGISTRATION_CHECK_LAUNCH,
769
+ { sourceInfo, ...data },
300
770
  );
301
771
  }
302
772
 
303
- static logEvent_ShowcaseManagerOpenFailure(
773
+ static logEvent_ServiceRegistrationCheckSucceeded(
304
774
  service: TelemetryService,
305
- data: ShowcaseFailure_TelemetryData,
775
+ sourceInfo: LegendSourceInfo | undefined,
776
+ data: ServiceRegistrationCheckCommonData & {
777
+ durationMs: number;
778
+ registeredEnvCount: number;
779
+ errorCount: number;
780
+ },
306
781
  ): void {
307
782
  service.logEvent(
308
- LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_OPEN__FAILURE,
309
- data,
783
+ LEGEND_STUDIO_APP_EVENT.SERVICE_REGISTRATION_CHECK_SUCCESS,
784
+ { sourceInfo, ...data },
310
785
  );
311
786
  }
312
787
 
313
- static logEvent_ShowcaseManagerSearchFailure(
788
+ static logEvent_ServiceRegistrationCheckFailure(
314
789
  service: TelemetryService,
315
- data: ShowcaseFailure_TelemetryData,
790
+ sourceInfo: LegendSourceInfo | undefined,
791
+ data: { servicePath: string; env: string; errorMessage: string },
316
792
  ): void {
317
793
  service.logEvent(
318
- LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_SEARCH__FAILURE,
319
- data,
794
+ LEGEND_STUDIO_APP_EVENT.SERVICE_REGISTRATION_CHECK_FAILURE,
795
+ { sourceInfo, ...data },
320
796
  );
321
797
  }
322
798
 
323
- // virtual assistant
324
- static logEvent_VirtualAssistantPanelOpened(service: TelemetryService): void {
325
- service.logEvent(APPLICATION_EVENT.VIRTUAL_ASSISTANT_PANEL__OPEN, {});
799
+ // Model / artifact / element-schema generation
800
+ static logEvent_GenerationLaunched(
801
+ service: TelemetryService,
802
+ sourceInfo: LegendSourceInfo | undefined,
803
+ data: GenerationCommonData,
804
+ ): void {
805
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.GENERATION_LAUNCH, {
806
+ sourceInfo,
807
+ ...data,
808
+ });
326
809
  }
327
810
 
328
- static logEvent_VirtualAssistantPanelClosed(service: TelemetryService): void {
329
- service.logEvent(APPLICATION_EVENT.VIRTUAL_ASSISTANT_PANEL__CLOSE, {});
811
+ static logEvent_GenerationSucceeded(
812
+ service: TelemetryService,
813
+ sourceInfo: LegendSourceInfo | undefined,
814
+ data: GenerationCommonData & { durationMs: number },
815
+ ): void {
816
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.GENERATION_SUCCESS, {
817
+ sourceInfo,
818
+ ...data,
819
+ });
330
820
  }
331
821
 
332
- static logEvent_VirtualAssistantTabAccessed(
822
+ static logEvent_GenerationFailure(
333
823
  service: TelemetryService,
334
- tab: string,
824
+ sourceInfo: LegendSourceInfo | undefined,
825
+ data: GenerationCommonData & { errorMessage: string },
335
826
  ): void {
336
- service.logEvent(APPLICATION_EVENT.VIRTUAL_ASSISTANT_TAB__ACCESS, { tab });
827
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.GENERATION_FAILURE, {
828
+ sourceInfo,
829
+ ...data,
830
+ });
337
831
  }
338
832
 
339
- static logEvent_VirtualAssistantDocumentationSearchInitiated(
833
+ // Editor tab lifecycle
834
+ static logEvent_EditorTabOpened(
835
+ service: TelemetryService,
836
+ sourceInfo: LegendSourceInfo | undefined,
837
+ data: EditorTabCommonData & { trigger: EDITOR_TAB_OPEN_TRIGGER },
838
+ ): void {
839
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.EDITOR_TAB__OPEN, {
840
+ sourceInfo,
841
+ ...data,
842
+ });
843
+ }
844
+
845
+ static logEvent_EditorTabClosed(
846
+ service: TelemetryService,
847
+ sourceInfo: LegendSourceInfo | undefined,
848
+ data: EditorTabCommonData & {
849
+ dwellMs: number;
850
+ trigger: EDITOR_TAB_CLOSE_TRIGGER;
851
+ },
852
+ ): void {
853
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.EDITOR_TAB__CLOSE, {
854
+ sourceInfo,
855
+ ...data,
856
+ });
857
+ }
858
+
859
+ // showcase manager
860
+ static logEvent_ShowcaseManagerLaunch(
861
+ service: TelemetryService,
862
+ data: ShowcaseMetadata_TelemetryData,
863
+ ): void {
864
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_LAUNCH, data);
865
+ }
866
+ static logEvent_ShowcaseManagerShowcaseProjectLaunch(
867
+ service: TelemetryService,
868
+ data: ShowcaseProject_TelemetryData,
869
+ ): void {
870
+ service.logEvent(
871
+ LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_SHOWCASE_PROJECT_LAUNCH,
872
+ data,
873
+ );
874
+ }
875
+ static logEvent_ShowcaseViewerLaunch(
876
+ service: TelemetryService,
877
+ data: ShowcaseProject_TelemetryData,
878
+ ): void {
879
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SHOWCASE_VIEWER_LAUNCH, data);
880
+ }
881
+
882
+ static logEvent_ShowcaseSearchInitiated(
883
+ service: TelemetryService,
884
+ data: ShowcaseSearchInitiated_TelemetryData,
885
+ ): void {
886
+ service.logEvent(
887
+ LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_SEARCH__INITIATED,
888
+ data,
889
+ );
890
+ }
891
+
892
+ static logEvent_ShowcaseSearchCompleted(
893
+ service: TelemetryService,
894
+ data: ShowcaseSearchCompleted_TelemetryData,
895
+ ): void {
896
+ service.logEvent(
897
+ LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_SEARCH__COMPLETED,
898
+ data,
899
+ );
900
+ }
901
+
902
+ static logEvent_ShowcaseViewerClose(
903
+ service: TelemetryService,
904
+ data: ShowcaseViewerClose_TelemetryData,
905
+ ): void {
906
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SHOWCASE_VIEWER_CLOSE, data);
907
+ }
908
+
909
+ static logEvent_ShowcaseFeedbackSubmit(
910
+ service: TelemetryService,
911
+ data: ShowcaseFeedback_TelemetryData,
912
+ ): void {
913
+ service.logEvent(
914
+ LEGEND_STUDIO_APP_EVENT.SHOWCASE_VIEWER_FEEDBACK__SUBMIT,
915
+ data,
916
+ );
917
+ }
918
+
919
+ static logEvent_ShowcaseManagerInitFailure(
920
+ service: TelemetryService,
921
+ data: ShowcaseFailure_TelemetryData,
922
+ ): void {
923
+ service.logEvent(
924
+ LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_INIT__FAILURE,
925
+ data,
926
+ );
927
+ }
928
+
929
+ static logEvent_ShowcaseManagerOpenFailure(
930
+ service: TelemetryService,
931
+ data: ShowcaseFailure_TelemetryData,
932
+ ): void {
933
+ service.logEvent(
934
+ LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_OPEN__FAILURE,
935
+ data,
936
+ );
937
+ }
938
+
939
+ static logEvent_ShowcaseManagerSearchFailure(
940
+ service: TelemetryService,
941
+ data: ShowcaseFailure_TelemetryData,
942
+ ): void {
943
+ service.logEvent(
944
+ LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_SEARCH__FAILURE,
945
+ data,
946
+ );
947
+ }
948
+
949
+ // virtual assistant
950
+ static logEvent_VirtualAssistantPanelOpened(service: TelemetryService): void {
951
+ service.logEvent(APPLICATION_EVENT.VIRTUAL_ASSISTANT_PANEL__OPEN, {});
952
+ }
953
+
954
+ static logEvent_VirtualAssistantPanelClosed(service: TelemetryService): void {
955
+ service.logEvent(APPLICATION_EVENT.VIRTUAL_ASSISTANT_PANEL__CLOSE, {});
956
+ }
957
+
958
+ static logEvent_VirtualAssistantTabAccessed(
959
+ service: TelemetryService,
960
+ tab: string,
961
+ ): void {
962
+ service.logEvent(APPLICATION_EVENT.VIRTUAL_ASSISTANT_TAB__ACCESS, { tab });
963
+ }
964
+
965
+ static logEvent_VirtualAssistantDocumentationSearchInitiated(
340
966
  service: TelemetryService,
341
967
  searchText: string,
342
968
  ): void {
@@ -452,300 +1078,859 @@ export class LegendStudioTelemetryHelper {
452
1078
  errorMessage: string,
453
1079
  sourceInfo?: LegendSourceInfo | undefined,
454
1080
  ): void {
455
- telemetryService.logEvent(
456
- LEGEND_STUDIO_APP_EVENT.DATASPACE_LEGENDAI_SUGGEST__FAILURE,
457
- { dataSpacePath, errorMessage, sourceInfo },
1081
+ telemetryService.logEvent(
1082
+ LEGEND_STUDIO_APP_EVENT.DATASPACE_LEGENDAI_SUGGEST__FAILURE,
1083
+ { dataSpacePath, errorMessage, sourceInfo },
1084
+ );
1085
+ }
1086
+
1087
+ static logEvent_DataProductLegendAISuggestLaunched(
1088
+ telemetryService: TelemetryService,
1089
+ dataProductPath: string,
1090
+ sourceInfo?: LegendSourceInfo | undefined,
1091
+ ): void {
1092
+ telemetryService.logEvent(
1093
+ LEGEND_STUDIO_APP_EVENT.DATA_PRODUCT_LEGENDAI_SUGGEST__LAUNCH,
1094
+ { dataProductPath, sourceInfo },
1095
+ );
1096
+ }
1097
+
1098
+ static logEvent_DataProductLegendAISuggestApplied(
1099
+ telemetryService: TelemetryService,
1100
+ dataProductPath: string,
1101
+ sourceInfo?: LegendSourceInfo | undefined,
1102
+ ): void {
1103
+ telemetryService.logEvent(
1104
+ LEGEND_STUDIO_APP_EVENT.DATA_PRODUCT_LEGENDAI_SUGGEST__APPLY,
1105
+ { dataProductPath, sourceInfo },
1106
+ );
1107
+ }
1108
+
1109
+ static logEvent_DataProductLegendAISuggestDiscarded(
1110
+ telemetryService: TelemetryService,
1111
+ dataProductPath: string,
1112
+ sourceInfo?: LegendSourceInfo | undefined,
1113
+ ): void {
1114
+ telemetryService.logEvent(
1115
+ LEGEND_STUDIO_APP_EVENT.DATA_PRODUCT_LEGENDAI_SUGGEST__DISCARD,
1116
+ { dataProductPath, sourceInfo },
1117
+ );
1118
+ }
1119
+
1120
+ static logEvent_DataProductLegendAISuggestFailure(
1121
+ telemetryService: TelemetryService,
1122
+ dataProductPath: string,
1123
+ errorMessage: string,
1124
+ sourceInfo?: LegendSourceInfo | undefined,
1125
+ ): void {
1126
+ telemetryService.logEvent(
1127
+ LEGEND_STUDIO_APP_EVENT.DATA_PRODUCT_LEGENDAI_SUGGEST__FAILURE,
1128
+ { dataProductPath, errorMessage, sourceInfo },
1129
+ );
1130
+ }
1131
+
1132
+ // Push to Dev Metadata
1133
+ static logEvent_DevMetadataPushLaunched(
1134
+ service: TelemetryService,
1135
+ sourceInfo: LegendSourceInfo | undefined,
1136
+ groupId: string,
1137
+ artifactId: string,
1138
+ versionId: string | undefined,
1139
+ lakehouseElementCounts: {
1140
+ ingestCount: number;
1141
+ dataProductCount: number;
1142
+ },
1143
+ ): void {
1144
+ service.logEvent(
1145
+ LEGEND_STUDIO_APP_EVENT.METADATA_PUSH_TO_METADATA__LAUNCH,
1146
+ {
1147
+ sourceInfo,
1148
+ groupId,
1149
+ artifactId,
1150
+ versionId,
1151
+ ...lakehouseElementCounts,
1152
+ },
1153
+ );
1154
+ }
1155
+
1156
+ static logEvent_DevMetadataPushSucceeded(
1157
+ service: TelemetryService,
1158
+ sourceInfo: LegendSourceInfo | undefined,
1159
+ groupId: string,
1160
+ artifactId: string,
1161
+ versionId: string | undefined,
1162
+ status: string,
1163
+ lakehouseElementCounts: {
1164
+ ingestCount: number;
1165
+ dataProductCount: number;
1166
+ },
1167
+ ): void {
1168
+ service.logEvent(
1169
+ LEGEND_STUDIO_APP_EVENT.METADATA_PUSH_TO_METADATA__SUCCESS,
1170
+ {
1171
+ sourceInfo,
1172
+ groupId,
1173
+ artifactId,
1174
+ versionId,
1175
+ status,
1176
+ ...lakehouseElementCounts,
1177
+ },
1178
+ );
1179
+ }
1180
+
1181
+ static logEvent_DevMetadataPushFailure(
1182
+ service: TelemetryService,
1183
+ sourceInfo: LegendSourceInfo | undefined,
1184
+ errorMessage: string,
1185
+ ): void {
1186
+ service.logEvent(
1187
+ LEGEND_STUDIO_APP_EVENT.METADATA_PUSH_TO_METADATA__FAILURE,
1188
+ {
1189
+ sourceInfo,
1190
+ errorMessage,
1191
+ },
1192
+ );
1193
+ }
1194
+
1195
+ // Text mode session
1196
+ static logEvent_TextModeEntered(
1197
+ service: TelemetryService,
1198
+ sourceInfo: LegendSourceInfo | undefined,
1199
+ data: {
1200
+ trigger: TEXT_MODE_ENTER_TRIGGER;
1201
+ strict: boolean;
1202
+ elementPath?: string | undefined;
1203
+ },
1204
+ ): void {
1205
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE__ENTER, {
1206
+ sourceInfo,
1207
+ ...data,
1208
+ });
1209
+ }
1210
+
1211
+ static logEvent_TextModeLeft(
1212
+ service: TelemetryService,
1213
+ sourceInfo: LegendSourceInfo | undefined,
1214
+ data: {
1215
+ outcome: TEXT_MODE_LEAVE_OUTCOME;
1216
+ durationMs: number;
1217
+ editCount: number;
1218
+ compilationCount: number;
1219
+ },
1220
+ ): void {
1221
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE__LEAVE, {
1222
+ sourceInfo,
1223
+ ...data,
1224
+ });
1225
+ }
1226
+
1227
+ static logEvent_TextModeFirstEdit(
1228
+ service: TelemetryService,
1229
+ sourceInfo: LegendSourceInfo | undefined,
1230
+ timeToFirstEditMs: number,
1231
+ ): void {
1232
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE__FIRST_EDIT, {
1233
+ sourceInfo,
1234
+ timeToFirstEditMs,
1235
+ });
1236
+ }
1237
+
1238
+ // Push local changes (workspace save/commit)
1239
+ static logEvent_PushLocalChangesLaunched(
1240
+ service: TelemetryService,
1241
+ sourceInfo: LegendSourceInfo | undefined,
1242
+ data: { mode: GRAPH_EDITOR_MODE_LABEL; changeCount: number },
1243
+ ): void {
1244
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.PUSH_LOCAL_CHANGES__LAUNCH, {
1245
+ sourceInfo,
1246
+ ...data,
1247
+ });
1248
+ }
1249
+
1250
+ static logEvent_PushLocalChangesSucceeded(
1251
+ service: TelemetryService,
1252
+ sourceInfo: LegendSourceInfo | undefined,
1253
+ data: {
1254
+ mode: GRAPH_EDITOR_MODE_LABEL;
1255
+ changeCount: number;
1256
+ durationMs: number;
1257
+ revisionId: string | undefined;
1258
+ },
1259
+ ): void {
1260
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.PUSH_LOCAL_CHANGES__SUCCESS, {
1261
+ sourceInfo,
1262
+ ...data,
1263
+ });
1264
+ }
1265
+
1266
+ static logEvent_PushLocalChangesFailure(
1267
+ service: TelemetryService,
1268
+ sourceInfo: LegendSourceInfo | undefined,
1269
+ data: {
1270
+ mode: GRAPH_EDITOR_MODE_LABEL;
1271
+ changeCount: number;
1272
+ errorMessage: string;
1273
+ },
1274
+ ): void {
1275
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.PUSH_LOCAL_CHANGES__FAILURE, {
1276
+ sourceInfo,
1277
+ ...data,
1278
+ });
1279
+ }
1280
+
1281
+ // Workspace update (pull)
1282
+ static logEvent_WorkspaceUpdateLaunched(
1283
+ service: TelemetryService,
1284
+ sourceInfo: LegendSourceInfo | undefined,
1285
+ ): void {
1286
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.UPDATE_WORKSPACE__LAUNCH, {
1287
+ sourceInfo,
1288
+ });
1289
+ }
1290
+
1291
+ static logEvent_WorkspaceUpdateSucceeded(
1292
+ service: TelemetryService,
1293
+ sourceInfo: LegendSourceInfo | undefined,
1294
+ data: { status: string; durationMs: number },
1295
+ ): void {
1296
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.UPDATE_WORKSPACE__SUCCESS, {
1297
+ sourceInfo,
1298
+ ...data,
1299
+ });
1300
+ }
1301
+
1302
+ static logEvent_WorkspaceUpdateFailure(
1303
+ service: TelemetryService,
1304
+ sourceInfo: LegendSourceInfo | undefined,
1305
+ errorMessage: string,
1306
+ ): void {
1307
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.UPDATE_WORKSPACE__FAILURE, {
1308
+ sourceInfo,
1309
+ errorMessage,
1310
+ });
1311
+ }
1312
+
1313
+ // Text mode - Phase 2
1314
+ static logEvent_TextModeCompilationFailure(
1315
+ service: TelemetryService,
1316
+ sourceInfo: LegendSourceInfo | undefined,
1317
+ data: {
1318
+ errorKind: TEXT_MODE_COMPILATION_ERROR_KIND;
1319
+ errorMessage: string;
1320
+ },
1321
+ ): void {
1322
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE_COMPILATION__FAILURE, {
1323
+ sourceInfo,
1324
+ ...data,
1325
+ });
1326
+ }
1327
+
1328
+ static logEvent_TextModeStrictLaunch(
1329
+ service: TelemetryService,
1330
+ sourceInfo: LegendSourceInfo | undefined,
1331
+ ): void {
1332
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE__STRICT_LAUNCH, {
1333
+ sourceInfo,
1334
+ });
1335
+ }
1336
+
1337
+ static logEvent_TextModeToggleShortcutInvoked(
1338
+ service: TelemetryService,
1339
+ sourceInfo: LegendSourceInfo | undefined,
1340
+ data: {
1341
+ source: TEXT_MODE_TOGGLE_SOURCE;
1342
+ direction: TEXT_MODE_TOGGLE_DIRECTION;
1343
+ },
1344
+ ): void {
1345
+ service.logEvent(
1346
+ LEGEND_STUDIO_APP_EVENT.TEXT_MODE__TOGGLE_SHORTCUT_INVOKED,
1347
+ { sourceInfo, ...data },
1348
+ );
1349
+ }
1350
+
1351
+ static logEvent_TextModeAction(
1352
+ service: TelemetryService,
1353
+ sourceInfo: LegendSourceInfo | undefined,
1354
+ data: {
1355
+ action: TEXT_MODE_ACTION;
1356
+ status: TEXT_MODE_ACTION_STATUS;
1357
+ errorMessage?: string | undefined;
1358
+ },
1359
+ ): void {
1360
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE__ACTION, {
1361
+ sourceInfo,
1362
+ ...data,
1363
+ });
1364
+ }
1365
+
1366
+ // Push local changes - Phase 2
1367
+ static logEvent_PushLocalChangesEmpty(
1368
+ service: TelemetryService,
1369
+ sourceInfo: LegendSourceInfo | undefined,
1370
+ data: { mode: GRAPH_EDITOR_MODE_LABEL },
1371
+ ): void {
1372
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.PUSH_LOCAL_CHANGES__EMPTY, {
1373
+ sourceInfo,
1374
+ ...data,
1375
+ });
1376
+ }
1377
+
1378
+ // Workflow manager
1379
+ static logEvent_WorkflowManagerPanelOpened(
1380
+ service: TelemetryService,
1381
+ sourceInfo: LegendSourceInfo | undefined,
1382
+ data: { scope: WORKFLOW_MANAGER_SCOPE },
1383
+ ): void {
1384
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_PANEL__OPEN, {
1385
+ sourceInfo,
1386
+ ...data,
1387
+ });
1388
+ }
1389
+
1390
+ static logEvent_WorkflowManagerPanelClosed(
1391
+ service: TelemetryService,
1392
+ sourceInfo: LegendSourceInfo | undefined,
1393
+ data: { scope: WORKFLOW_MANAGER_SCOPE; dwellMs: number },
1394
+ ): void {
1395
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_PANEL__CLOSE, {
1396
+ sourceInfo,
1397
+ ...data,
1398
+ });
1399
+ }
1400
+
1401
+ static logEvent_WorkflowManagerFetchWorkflowsLaunched(
1402
+ service: TelemetryService,
1403
+ sourceInfo: LegendSourceInfo | undefined,
1404
+ data: { scope: WORKFLOW_MANAGER_SCOPE },
1405
+ ): void {
1406
+ service.logEvent(
1407
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_FETCH_WORKFLOWS__LAUNCH,
1408
+ { sourceInfo, ...data },
1409
+ );
1410
+ }
1411
+
1412
+ static logEvent_WorkflowManagerFetchWorkflowsSucceeded(
1413
+ service: TelemetryService,
1414
+ sourceInfo: LegendSourceInfo | undefined,
1415
+ data: {
1416
+ scope: WORKFLOW_MANAGER_SCOPE;
1417
+ durationMs: number;
1418
+ workflowCount: number;
1419
+ statusBreakdown: WorkflowManagerStatusBreakdown;
1420
+ },
1421
+ ): void {
1422
+ service.logEvent(
1423
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_FETCH_WORKFLOWS__SUCCESS,
1424
+ { sourceInfo, ...data },
1425
+ );
1426
+ }
1427
+
1428
+ static logEvent_WorkflowManagerFetchWorkflowsFailure(
1429
+ service: TelemetryService,
1430
+ sourceInfo: LegendSourceInfo | undefined,
1431
+ data: { scope: WORKFLOW_MANAGER_SCOPE; errorMessage: string },
1432
+ ): void {
1433
+ service.logEvent(
1434
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_FETCH_WORKFLOWS__FAILURE,
1435
+ { sourceInfo, ...data },
1436
+ );
1437
+ }
1438
+
1439
+ static logEvent_WorkflowManagerWorkflowExpand(
1440
+ service: TelemetryService,
1441
+ sourceInfo: LegendSourceInfo | undefined,
1442
+ data: { scope: WORKFLOW_MANAGER_SCOPE; workflowStatus: string },
1443
+ ): void {
1444
+ service.logEvent(
1445
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_WORKFLOW__EXPAND,
1446
+ { sourceInfo, ...data },
1447
+ );
1448
+ }
1449
+
1450
+ static logEvent_WorkflowManagerWorkflowRefresh(
1451
+ service: TelemetryService,
1452
+ sourceInfo: LegendSourceInfo | undefined,
1453
+ data: { scope: WORKFLOW_MANAGER_SCOPE; workflowStatus: string },
1454
+ ): void {
1455
+ service.logEvent(
1456
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_WORKFLOW__REFRESH,
1457
+ { sourceInfo, ...data },
1458
+ );
1459
+ }
1460
+
1461
+ static logEvent_WorkflowManagerFetchJobsLaunched(
1462
+ service: TelemetryService,
1463
+ sourceInfo: LegendSourceInfo | undefined,
1464
+ data: { scope: WORKFLOW_MANAGER_SCOPE },
1465
+ ): void {
1466
+ service.logEvent(
1467
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_FETCH_JOBS__LAUNCH,
1468
+ { sourceInfo, ...data },
1469
+ );
1470
+ }
1471
+
1472
+ static logEvent_WorkflowManagerFetchJobsSucceeded(
1473
+ service: TelemetryService,
1474
+ sourceInfo: LegendSourceInfo | undefined,
1475
+ data: {
1476
+ scope: WORKFLOW_MANAGER_SCOPE;
1477
+ durationMs: number;
1478
+ jobCount: number;
1479
+ statusBreakdown: WorkflowManagerStatusBreakdown;
1480
+ },
1481
+ ): void {
1482
+ service.logEvent(
1483
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_FETCH_JOBS__SUCCESS,
1484
+ { sourceInfo, ...data },
1485
+ );
1486
+ }
1487
+
1488
+ static logEvent_WorkflowManagerFetchJobsFailure(
1489
+ service: TelemetryService,
1490
+ sourceInfo: LegendSourceInfo | undefined,
1491
+ data: { scope: WORKFLOW_MANAGER_SCOPE; errorMessage: string },
1492
+ ): void {
1493
+ service.logEvent(
1494
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_FETCH_JOBS__FAILURE,
1495
+ { sourceInfo, ...data },
1496
+ );
1497
+ }
1498
+
1499
+ static logEvent_WorkflowManagerJobActionLaunched(
1500
+ service: TelemetryService,
1501
+ sourceInfo: LegendSourceInfo | undefined,
1502
+ data: {
1503
+ scope: WORKFLOW_MANAGER_SCOPE;
1504
+ action: WORKFLOW_MANAGER_JOB_ACTION;
1505
+ jobName: string;
1506
+ jobStatus: string;
1507
+ },
1508
+ ): void {
1509
+ service.logEvent(
1510
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_JOB_ACTION__LAUNCH,
1511
+ { sourceInfo, ...data },
1512
+ );
1513
+ }
1514
+
1515
+ static logEvent_WorkflowManagerJobActionSucceeded(
1516
+ service: TelemetryService,
1517
+ sourceInfo: LegendSourceInfo | undefined,
1518
+ data: {
1519
+ scope: WORKFLOW_MANAGER_SCOPE;
1520
+ action: WORKFLOW_MANAGER_JOB_ACTION;
1521
+ jobName: string;
1522
+ durationMs: number;
1523
+ },
1524
+ ): void {
1525
+ service.logEvent(
1526
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_JOB_ACTION__SUCCESS,
1527
+ { sourceInfo, ...data },
458
1528
  );
459
1529
  }
460
1530
 
461
- static logEvent_DataProductLegendAISuggestLaunched(
462
- telemetryService: TelemetryService,
463
- dataProductPath: string,
464
- sourceInfo?: LegendSourceInfo | undefined,
1531
+ static logEvent_WorkflowManagerJobActionFailure(
1532
+ service: TelemetryService,
1533
+ sourceInfo: LegendSourceInfo | undefined,
1534
+ data: {
1535
+ scope: WORKFLOW_MANAGER_SCOPE;
1536
+ action: WORKFLOW_MANAGER_JOB_ACTION;
1537
+ jobName: string;
1538
+ errorMessage: string;
1539
+ },
465
1540
  ): void {
466
- telemetryService.logEvent(
467
- LEGEND_STUDIO_APP_EVENT.DATA_PRODUCT_LEGENDAI_SUGGEST__LAUNCH,
468
- { dataProductPath, sourceInfo },
1541
+ service.logEvent(
1542
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_JOB_ACTION__FAILURE,
1543
+ { sourceInfo, ...data },
469
1544
  );
470
1545
  }
471
1546
 
472
- static logEvent_DataProductLegendAISuggestApplied(
473
- telemetryService: TelemetryService,
474
- dataProductPath: string,
475
- sourceInfo?: LegendSourceInfo | undefined,
1547
+ static logEvent_WorkflowManagerJobLogsOpened(
1548
+ service: TelemetryService,
1549
+ sourceInfo: LegendSourceInfo | undefined,
1550
+ data: {
1551
+ scope: WORKFLOW_MANAGER_SCOPE;
1552
+ jobName: string;
1553
+ jobStatus: string;
1554
+ },
476
1555
  ): void {
477
- telemetryService.logEvent(
478
- LEGEND_STUDIO_APP_EVENT.DATA_PRODUCT_LEGENDAI_SUGGEST__APPLY,
479
- { dataProductPath, sourceInfo },
480
- );
1556
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_JOB_LOGS__OPEN, {
1557
+ sourceInfo,
1558
+ ...data,
1559
+ });
481
1560
  }
482
1561
 
483
- static logEvent_DataProductLegendAISuggestDiscarded(
484
- telemetryService: TelemetryService,
485
- dataProductPath: string,
486
- sourceInfo?: LegendSourceInfo | undefined,
1562
+ static logEvent_WorkflowManagerJobLogsClosed(
1563
+ service: TelemetryService,
1564
+ sourceInfo: LegendSourceInfo | undefined,
1565
+ data: {
1566
+ scope: WORKFLOW_MANAGER_SCOPE;
1567
+ jobName: string;
1568
+ dwellMs: number;
1569
+ refreshCount: number;
1570
+ },
487
1571
  ): void {
488
- telemetryService.logEvent(
489
- LEGEND_STUDIO_APP_EVENT.DATA_PRODUCT_LEGENDAI_SUGGEST__DISCARD,
490
- { dataProductPath, sourceInfo },
491
- );
1572
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_JOB_LOGS__CLOSE, {
1573
+ sourceInfo,
1574
+ ...data,
1575
+ });
492
1576
  }
493
1577
 
494
- static logEvent_DataProductLegendAISuggestFailure(
495
- telemetryService: TelemetryService,
496
- dataProductPath: string,
497
- errorMessage: string,
498
- sourceInfo?: LegendSourceInfo | undefined,
1578
+ static logEvent_WorkflowManagerJobLogsRefresh(
1579
+ service: TelemetryService,
1580
+ sourceInfo: LegendSourceInfo | undefined,
1581
+ data: { scope: WORKFLOW_MANAGER_SCOPE; jobName: string },
499
1582
  ): void {
500
- telemetryService.logEvent(
501
- LEGEND_STUDIO_APP_EVENT.DATA_PRODUCT_LEGENDAI_SUGGEST__FAILURE,
502
- { dataProductPath, errorMessage, sourceInfo },
1583
+ service.logEvent(
1584
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_JOB_LOGS__REFRESH,
1585
+ { sourceInfo, ...data },
503
1586
  );
504
1587
  }
505
1588
 
506
- // Push to Dev Metadata
507
- static logEvent_DevMetadataPushLaunched(
1589
+ static logEvent_WorkflowManagerJobLogsFetchSucceeded(
508
1590
  service: TelemetryService,
509
1591
  sourceInfo: LegendSourceInfo | undefined,
510
- groupId: string,
511
- artifactId: string,
512
- versionId: string | undefined,
513
- lakehouseElementCounts: {
514
- ingestCount: number;
515
- dataProductCount: number;
1592
+ data: {
1593
+ scope: WORKFLOW_MANAGER_SCOPE;
1594
+ jobName: string;
1595
+ durationMs: number;
1596
+ logSizeBytes: number;
516
1597
  },
517
1598
  ): void {
518
1599
  service.logEvent(
519
- LEGEND_STUDIO_APP_EVENT.METADATA_PUSH_TO_METADATA__LAUNCH,
520
- {
521
- sourceInfo,
522
- groupId,
523
- artifactId,
524
- versionId,
525
- ...lakehouseElementCounts,
526
- },
1600
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_JOB_LOGS_FETCH__SUCCESS,
1601
+ { sourceInfo, ...data },
527
1602
  );
528
1603
  }
529
1604
 
530
- static logEvent_DevMetadataPushSucceeded(
1605
+ static logEvent_WorkflowManagerJobLogsFetchFailure(
531
1606
  service: TelemetryService,
532
1607
  sourceInfo: LegendSourceInfo | undefined,
533
- groupId: string,
534
- artifactId: string,
535
- versionId: string | undefined,
536
- status: string,
537
- lakehouseElementCounts: {
538
- ingestCount: number;
539
- dataProductCount: number;
1608
+ data: {
1609
+ scope: WORKFLOW_MANAGER_SCOPE;
1610
+ jobName: string;
1611
+ errorMessage: string;
540
1612
  },
541
1613
  ): void {
542
1614
  service.logEvent(
543
- LEGEND_STUDIO_APP_EVENT.METADATA_PUSH_TO_METADATA__SUCCESS,
544
- {
545
- sourceInfo,
546
- groupId,
547
- artifactId,
548
- versionId,
549
- status,
550
- ...lakehouseElementCounts,
551
- },
1615
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_JOB_LOGS_FETCH__FAILURE,
1616
+ { sourceInfo, ...data },
552
1617
  );
553
1618
  }
554
1619
 
555
- static logEvent_DevMetadataPushFailure(
1620
+ // Service test suite run
1621
+ static logEvent_ServiceTestSuiteRunLaunched(
556
1622
  service: TelemetryService,
557
1623
  sourceInfo: LegendSourceInfo | undefined,
558
- errorMessage: string,
1624
+ data: ServiceTestSuiteRunCommonData,
559
1625
  ): void {
560
- service.logEvent(
561
- LEGEND_STUDIO_APP_EVENT.METADATA_PUSH_TO_METADATA__FAILURE,
562
- {
563
- sourceInfo,
564
- errorMessage,
565
- },
566
- );
1626
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SERVICE_TEST_SUITE_RUN__LAUNCH, {
1627
+ sourceInfo,
1628
+ ...data,
1629
+ });
567
1630
  }
568
1631
 
569
- // Text mode session
570
- static logEvent_TextModeEntered(
1632
+ static logEvent_ServiceTestSuiteRunSucceeded(
571
1633
  service: TelemetryService,
572
1634
  sourceInfo: LegendSourceInfo | undefined,
573
- data: {
574
- trigger: TEXT_MODE_ENTER_TRIGGER;
575
- strict: boolean;
576
- elementPath?: string | undefined;
1635
+ data: ServiceTestSuiteRunCommonData & {
1636
+ durationMs: number;
1637
+ passedCount: number;
1638
+ failedCount: number;
1639
+ erroredCount: number;
577
1640
  },
578
1641
  ): void {
579
- service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE__ENTER, {
1642
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SERVICE_TEST_SUITE_RUN__SUCCESS, {
580
1643
  sourceInfo,
581
1644
  ...data,
582
1645
  });
583
1646
  }
584
1647
 
585
- static logEvent_TextModeLeft(
1648
+ static logEvent_ServiceTestSuiteRunFailure(
586
1649
  service: TelemetryService,
587
1650
  sourceInfo: LegendSourceInfo | undefined,
588
- data: {
589
- outcome: TEXT_MODE_LEAVE_OUTCOME;
1651
+ data: ServiceTestSuiteRunCommonData & { errorMessage: string },
1652
+ ): void {
1653
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SERVICE_TEST_SUITE_RUN__FAILURE, {
1654
+ sourceInfo,
1655
+ ...data,
1656
+ });
1657
+ }
1658
+
1659
+ // Unified testable run (mapping / data product / ingest / function activator / availability)
1660
+ static logEvent_TestableRunLaunched(
1661
+ service: TelemetryService,
1662
+ sourceInfo: LegendSourceInfo | undefined,
1663
+ data: TestableRunCommonData,
1664
+ ): void {
1665
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TESTABLE_RUN__LAUNCH, {
1666
+ sourceInfo,
1667
+ ...data,
1668
+ });
1669
+ }
1670
+
1671
+ static logEvent_TestableRunSucceeded(
1672
+ service: TelemetryService,
1673
+ sourceInfo: LegendSourceInfo | undefined,
1674
+ data: TestableRunCommonData & {
590
1675
  durationMs: number;
591
- editCount: number;
592
- compilationCount: number;
1676
+ passedCount: number;
1677
+ failedCount: number;
1678
+ erroredCount: number;
593
1679
  },
594
1680
  ): void {
595
- service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE__LEAVE, {
1681
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TESTABLE_RUN__SUCCESS, {
596
1682
  sourceInfo,
597
1683
  ...data,
598
1684
  });
599
1685
  }
600
1686
 
601
- static logEvent_TextModeFirstEdit(
1687
+ static logEvent_TestableRunFailure(
602
1688
  service: TelemetryService,
603
1689
  sourceInfo: LegendSourceInfo | undefined,
604
- timeToFirstEditMs: number,
1690
+ data: TestableRunCommonData & { errorMessage: string },
605
1691
  ): void {
606
- service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE__FIRST_EDIT, {
1692
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TESTABLE_RUN__FAILURE, {
607
1693
  sourceInfo,
608
- timeToFirstEditMs,
1694
+ ...data,
609
1695
  });
610
1696
  }
611
1697
 
612
- // Push local changes (workspace save/commit)
613
- static logEvent_PushLocalChangesLaunched(
1698
+ // Global test runner (sidebar) — cross-testable runs
1699
+ static logEvent_GlobalTestRunLaunched(
614
1700
  service: TelemetryService,
615
1701
  sourceInfo: LegendSourceInfo | undefined,
616
- data: { mode: GRAPH_EDITOR_MODE_LABEL; changeCount: number },
1702
+ data: GlobalTestRunCommonData,
617
1703
  ): void {
618
- service.logEvent(LEGEND_STUDIO_APP_EVENT.PUSH_LOCAL_CHANGES__LAUNCH, {
1704
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.GLOBAL_TEST_RUN__LAUNCH, {
619
1705
  sourceInfo,
620
1706
  ...data,
621
1707
  });
622
1708
  }
623
1709
 
624
- static logEvent_PushLocalChangesSucceeded(
1710
+ static logEvent_GlobalTestRunSucceeded(
625
1711
  service: TelemetryService,
626
1712
  sourceInfo: LegendSourceInfo | undefined,
627
- data: {
628
- mode: GRAPH_EDITOR_MODE_LABEL;
629
- changeCount: number;
1713
+ data: GlobalTestRunCommonData & {
630
1714
  durationMs: number;
631
- revisionId: string | undefined;
1715
+ passedCount: number;
1716
+ failedCount: number;
1717
+ erroredCount: number;
632
1718
  },
633
1719
  ): void {
634
- service.logEvent(LEGEND_STUDIO_APP_EVENT.PUSH_LOCAL_CHANGES__SUCCESS, {
1720
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.GLOBAL_TEST_RUN__SUCCESS, {
635
1721
  sourceInfo,
636
1722
  ...data,
637
1723
  });
638
1724
  }
639
1725
 
640
- static logEvent_PushLocalChangesFailure(
1726
+ static logEvent_GlobalTestRunFailure(
641
1727
  service: TelemetryService,
642
1728
  sourceInfo: LegendSourceInfo | undefined,
643
- data: {
644
- mode: GRAPH_EDITOR_MODE_LABEL;
645
- changeCount: number;
646
- errorMessage: string;
647
- },
1729
+ data: GlobalTestRunCommonData & { errorMessage: string },
648
1730
  ): void {
649
- service.logEvent(LEGEND_STUDIO_APP_EVENT.PUSH_LOCAL_CHANGES__FAILURE, {
1731
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.GLOBAL_TEST_RUN__FAILURE, {
650
1732
  sourceInfo,
651
1733
  ...data,
652
1734
  });
653
1735
  }
654
1736
 
655
- // Workspace update (pull)
656
- static logEvent_WorkspaceUpdateLaunched(
1737
+ // SDLC review lifecycle
1738
+ //
1739
+ // Structured replacement for the SDLC_MANAGER_FAILURE bucket around review
1740
+ // actions (create / commit / close / reopen / approve). Fires from both the
1741
+ // author side (WorkspaceReviewState — carries sourceInfo from the workspace
1742
+ // editor) and the reviewer side (ProjectReviewerStore — no editor mode, so
1743
+ // sourceInfo is undefined; projectId / patchReleaseVersionId? / reviewId
1744
+ // are carried explicitly on the payload).
1745
+ //
1746
+ // Non-lifecycle SDLC calls in the same files (fetches, refresh, workspace
1747
+ // recreation after commit) stay on the generic SDLC_MANAGER_FAILURE bucket.
1748
+ static logEvent_SdlcReviewActionLaunched(
657
1749
  service: TelemetryService,
658
1750
  sourceInfo: LegendSourceInfo | undefined,
1751
+ data: SdlcReviewActionLaunchData,
659
1752
  ): void {
660
- service.logEvent(LEGEND_STUDIO_APP_EVENT.UPDATE_WORKSPACE__LAUNCH, {
1753
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SDLC_REVIEW_ACTION__LAUNCH, {
661
1754
  sourceInfo,
1755
+ ...data,
662
1756
  });
663
1757
  }
664
1758
 
665
- static logEvent_WorkspaceUpdateSucceeded(
1759
+ static logEvent_SdlcReviewActionSucceeded(
666
1760
  service: TelemetryService,
667
1761
  sourceInfo: LegendSourceInfo | undefined,
668
- data: { status: string; durationMs: number },
1762
+ data: SdlcReviewActionSuccessData,
669
1763
  ): void {
670
- service.logEvent(LEGEND_STUDIO_APP_EVENT.UPDATE_WORKSPACE__SUCCESS, {
1764
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SDLC_REVIEW_ACTION__SUCCESS, {
671
1765
  sourceInfo,
672
1766
  ...data,
673
1767
  });
674
1768
  }
675
1769
 
676
- static logEvent_WorkspaceUpdateFailure(
1770
+ static logEvent_SdlcReviewActionFailure(
677
1771
  service: TelemetryService,
678
1772
  sourceInfo: LegendSourceInfo | undefined,
679
- errorMessage: string,
1773
+ data: SdlcReviewActionFailureData,
680
1774
  ): void {
681
- service.logEvent(LEGEND_STUDIO_APP_EVENT.UPDATE_WORKSPACE__FAILURE, {
1775
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SDLC_REVIEW_ACTION__FAILURE, {
682
1776
  sourceInfo,
683
- errorMessage,
1777
+ ...data,
684
1778
  });
685
1779
  }
686
1780
 
687
- // Text mode - Phase 2
688
- static logEvent_TextModeCompilationFailure(
1781
+ // Workspace setup screen actions
1782
+ //
1783
+ // Structured replacement for the WORKSPACE_SETUP_FAILURE bucket plus the
1784
+ // create-project / import-project flows that previously emitted no
1785
+ // telemetry at all. Fires from the setup / project picker route, before
1786
+ // any editor mode is active — so `sourceInfo` is always undefined.
1787
+ static logEvent_SetupActionLaunched(
1788
+ service: TelemetryService,
1789
+ data: SetupActionLaunchData,
1790
+ ): void {
1791
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SETUP_ACTION__LAUNCH, {
1792
+ sourceInfo: undefined,
1793
+ ...data,
1794
+ });
1795
+ }
1796
+
1797
+ static logEvent_SetupActionSucceeded(
1798
+ service: TelemetryService,
1799
+ data: SetupActionSuccessData,
1800
+ ): void {
1801
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SETUP_ACTION__SUCCESS, {
1802
+ sourceInfo: undefined,
1803
+ ...data,
1804
+ });
1805
+ }
1806
+
1807
+ static logEvent_SetupActionFailure(
1808
+ service: TelemetryService,
1809
+ data: SetupActionFailureData,
1810
+ ): void {
1811
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SETUP_ACTION__FAILURE, {
1812
+ sourceInfo: undefined,
1813
+ ...data,
1814
+ });
1815
+ }
1816
+
1817
+ // Project configuration update lifecycle
1818
+ //
1819
+ // Structured replacement for the SDLC_MANAGER_FAILURE bucket around the
1820
+ // project configuration editor's writes (dependency add/remove, platform
1821
+ // configuration, structure version bump, project type toggle). All three
1822
+ // top-level flows funnel through `updateProjectConfiguration`, which is
1823
+ // the single point where these events are emitted; the `action` field
1824
+ // records which entry point the user came from.
1825
+ static logEvent_ProjectConfigUpdateLaunched(
689
1826
  service: TelemetryService,
690
1827
  sourceInfo: LegendSourceInfo | undefined,
691
- data: {
692
- errorKind: TEXT_MODE_COMPILATION_ERROR_KIND;
693
- errorMessage: string;
694
- },
1828
+ data: ProjectConfigUpdateLaunchData,
695
1829
  ): void {
696
- service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE_COMPILATION__FAILURE, {
1830
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.PROJECT_CONFIG_UPDATE__LAUNCH, {
697
1831
  sourceInfo,
698
1832
  ...data,
699
1833
  });
700
1834
  }
701
1835
 
702
- static logEvent_TextModeStrictLaunch(
1836
+ static logEvent_ProjectConfigUpdateSucceeded(
703
1837
  service: TelemetryService,
704
1838
  sourceInfo: LegendSourceInfo | undefined,
1839
+ data: ProjectConfigUpdateSuccessData,
705
1840
  ): void {
706
- service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE__STRICT_LAUNCH, {
1841
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.PROJECT_CONFIG_UPDATE__SUCCESS, {
707
1842
  sourceInfo,
1843
+ ...data,
708
1844
  });
709
1845
  }
710
1846
 
711
- static logEvent_TextModeToggleShortcutInvoked(
1847
+ static logEvent_ProjectConfigUpdateFailure(
712
1848
  service: TelemetryService,
713
1849
  sourceInfo: LegendSourceInfo | undefined,
714
- data: {
715
- source: TEXT_MODE_TOGGLE_SOURCE;
716
- direction: TEXT_MODE_TOGGLE_DIRECTION;
717
- },
1850
+ data: ProjectConfigUpdateFailureData,
718
1851
  ): void {
719
- service.logEvent(
720
- LEGEND_STUDIO_APP_EVENT.TEXT_MODE__TOGGLE_SHORTCUT_INVOKED,
721
- { sourceInfo, ...data },
722
- );
1852
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.PROJECT_CONFIG_UPDATE__FAILURE, {
1853
+ sourceInfo,
1854
+ ...data,
1855
+ });
723
1856
  }
724
1857
 
725
- static logEvent_TextModeAction(
1858
+ // Project overview sidebar SDLC writes
1859
+ //
1860
+ // Structured replacement for the SDLC_MANAGER_FAILURE bucket around
1861
+ // ProjectOverviewState's user-triggered writes (delete workspace, update
1862
+ // project metadata, create version, release patch, create patch). Fires
1863
+ // from inside the workspace editor so `sourceInfo` is populated; the
1864
+ // payload also carries `projectId` explicitly so events remain sliceable
1865
+ // without unpacking `sourceInfo`.
1866
+ static logEvent_ProjectOverviewActionLaunched(
726
1867
  service: TelemetryService,
727
1868
  sourceInfo: LegendSourceInfo | undefined,
728
- data: {
729
- action: TEXT_MODE_ACTION;
730
- status: TEXT_MODE_ACTION_STATUS;
731
- errorMessage?: string | undefined;
732
- },
1869
+ data: ProjectOverviewActionLaunchData,
733
1870
  ): void {
734
- service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE__ACTION, {
1871
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.PROJECT_OVERVIEW_ACTION__LAUNCH, {
735
1872
  sourceInfo,
736
1873
  ...data,
737
1874
  });
738
1875
  }
739
1876
 
740
- // Push local changes - Phase 2
741
- static logEvent_PushLocalChangesEmpty(
1877
+ static logEvent_ProjectOverviewActionSucceeded(
742
1878
  service: TelemetryService,
743
1879
  sourceInfo: LegendSourceInfo | undefined,
744
- data: { mode: GRAPH_EDITOR_MODE_LABEL },
1880
+ data: ProjectOverviewActionSuccessData,
745
1881
  ): void {
746
- service.logEvent(LEGEND_STUDIO_APP_EVENT.PUSH_LOCAL_CHANGES__EMPTY, {
1882
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.PROJECT_OVERVIEW_ACTION__SUCCESS, {
1883
+ sourceInfo,
1884
+ ...data,
1885
+ });
1886
+ }
1887
+
1888
+ static logEvent_ProjectOverviewActionFailure(
1889
+ service: TelemetryService,
1890
+ sourceInfo: LegendSourceInfo | undefined,
1891
+ data: ProjectOverviewActionFailureData,
1892
+ ): void {
1893
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.PROJECT_OVERVIEW_ACTION__FAILURE, {
747
1894
  sourceInfo,
748
1895
  ...data,
749
1896
  });
750
1897
  }
1898
+
1899
+ // Ad-hoc workspace creation from the editor bootstrap
1900
+ //
1901
+ // Fires when a user deep-links to a workspace that doesn't exist and
1902
+ // picks "Create workspace" from the recovery prompt in EditorStore.
1903
+ // Distinct bucket from SETUP_ACTION.CREATE_WORKSPACE because the
1904
+ // callsite, error-handling, and legacy log bucket
1905
+ // (WORKSPACE_SETUP_FAILURE) are different. `sourceInfo` is omitted —
1906
+ // no editor mode is active yet.
1907
+ static logEvent_SdlcWorkspaceCreateLaunched(
1908
+ service: TelemetryService,
1909
+ data: SdlcWorkspaceCreateLaunchData,
1910
+ ): void {
1911
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SDLC_WORKSPACE_CREATE__LAUNCH, {
1912
+ sourceInfo: undefined,
1913
+ ...data,
1914
+ });
1915
+ }
1916
+
1917
+ static logEvent_SdlcWorkspaceCreateSucceeded(
1918
+ service: TelemetryService,
1919
+ data: SdlcWorkspaceCreateSuccessData,
1920
+ ): void {
1921
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SDLC_WORKSPACE_CREATE__SUCCESS, {
1922
+ sourceInfo: undefined,
1923
+ ...data,
1924
+ });
1925
+ }
1926
+
1927
+ static logEvent_SdlcWorkspaceCreateFailure(
1928
+ service: TelemetryService,
1929
+ data: SdlcWorkspaceCreateFailureData,
1930
+ ): void {
1931
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SDLC_WORKSPACE_CREATE__FAILURE, {
1932
+ sourceInfo: undefined,
1933
+ ...data,
1934
+ });
1935
+ }
751
1936
  }