@finos/legend-application-studio 28.21.45 → 28.21.47

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 (209) hide show
  1. package/lib/__lib__/LegendStudioEvent.d.ts +63 -1
  2. package/lib/__lib__/LegendStudioEvent.d.ts.map +1 -1
  3. package/lib/__lib__/LegendStudioEvent.js +90 -0
  4. package/lib/__lib__/LegendStudioEvent.js.map +1 -1
  5. package/lib/__lib__/LegendStudioTelemetryHelper.d.ts +655 -1
  6. package/lib/__lib__/LegendStudioTelemetryHelper.d.ts.map +1 -1
  7. package/lib/__lib__/LegendStudioTelemetryHelper.js +709 -1
  8. package/lib/__lib__/LegendStudioTelemetryHelper.js.map +1 -1
  9. package/lib/components/editor/editor-group/LegendAISuggestTelemetryHooks.d.ts +30 -0
  10. package/lib/components/editor/editor-group/LegendAISuggestTelemetryHooks.d.ts.map +1 -0
  11. package/lib/components/editor/editor-group/LegendAISuggestTelemetryHooks.js +43 -0
  12. package/lib/components/editor/editor-group/LegendAISuggestTelemetryHooks.js.map +1 -0
  13. package/lib/components/editor/editor-group/RuntimeEditor.d.ts +4 -3
  14. package/lib/components/editor/editor-group/RuntimeEditor.d.ts.map +1 -1
  15. package/lib/components/editor/editor-group/RuntimeEditor.js +90 -36
  16. package/lib/components/editor/editor-group/RuntimeEditor.js.map +1 -1
  17. package/lib/components/editor/editor-group/dataProduct/DataProductEditor.d.ts.map +1 -1
  18. package/lib/components/editor/editor-group/dataProduct/DataProductEditor.js +154 -35
  19. package/lib/components/editor/editor-group/dataProduct/DataProductEditor.js.map +1 -1
  20. package/lib/components/editor/editor-group/dataProduct/DataProductQueryBuilderHelper.d.ts.map +1 -1
  21. package/lib/components/editor/editor-group/dataProduct/DataProductQueryBuilderHelper.js +4 -6
  22. package/lib/components/editor/editor-group/dataProduct/DataProductQueryBuilderHelper.js.map +1 -1
  23. package/lib/components/editor/editor-group/service-editor/ServiceEditor.d.ts.map +1 -1
  24. package/lib/components/editor/editor-group/service-editor/ServiceEditor.js +31 -7
  25. package/lib/components/editor/editor-group/service-editor/ServiceEditor.js.map +1 -1
  26. package/lib/components/editor/editor-group/service-editor/testable/ServiceTestDataEditor.d.ts.map +1 -1
  27. package/lib/components/editor/editor-group/service-editor/testable/ServiceTestDataEditor.js +4 -8
  28. package/lib/components/editor/editor-group/service-editor/testable/ServiceTestDataEditor.js.map +1 -1
  29. package/lib/components/editor/side-bar/WorkflowManager.d.ts.map +1 -1
  30. package/lib/components/editor/side-bar/WorkflowManager.js +15 -0
  31. package/lib/components/editor/side-bar/WorkflowManager.js.map +1 -1
  32. package/lib/index.css +1 -1
  33. package/lib/index.d.ts +3 -1
  34. package/lib/index.d.ts.map +1 -1
  35. package/lib/index.js +3 -1
  36. package/lib/index.js.map +1 -1
  37. package/lib/package.json +1 -1
  38. package/lib/stores/editor/EditorGraphState.d.ts.map +1 -1
  39. package/lib/stores/editor/EditorGraphState.js +17 -1
  40. package/lib/stores/editor/EditorGraphState.js.map +1 -1
  41. package/lib/stores/editor/EditorStore.d.ts +2 -0
  42. package/lib/stores/editor/EditorStore.d.ts.map +1 -1
  43. package/lib/stores/editor/EditorStore.js +12 -0
  44. package/lib/stores/editor/EditorStore.js.map +1 -1
  45. package/lib/stores/editor/EditorTabManagerState.d.ts +18 -1
  46. package/lib/stores/editor/EditorTabManagerState.d.ts.map +1 -1
  47. package/lib/stores/editor/EditorTabManagerState.js +90 -1
  48. package/lib/stores/editor/EditorTabManagerState.js.map +1 -1
  49. package/lib/stores/editor/EditorTabTelemetryHelper.d.ts +31 -0
  50. package/lib/stores/editor/EditorTabTelemetryHelper.d.ts.map +1 -0
  51. package/lib/stores/editor/EditorTabTelemetryHelper.js +55 -0
  52. package/lib/stores/editor/EditorTabTelemetryHelper.js.map +1 -0
  53. package/lib/stores/editor/GraphEditFormModeState.d.ts.map +1 -1
  54. package/lib/stores/editor/GraphEditFormModeState.js +22 -1
  55. package/lib/stores/editor/GraphEditFormModeState.js.map +1 -1
  56. package/lib/stores/editor/LegendAISuggestTelemetry.d.ts +143 -0
  57. package/lib/stores/editor/LegendAISuggestTelemetry.d.ts.map +1 -0
  58. package/lib/stores/editor/LegendAISuggestTelemetry.js +376 -0
  59. package/lib/stores/editor/LegendAISuggestTelemetry.js.map +1 -0
  60. package/lib/stores/editor/LegendSQLStudioPlaygroundState.js +3 -3
  61. package/lib/stores/editor/LegendSQLStudioPlaygroundState.js.map +1 -1
  62. package/lib/stores/editor/editor-state/GraphGenerationState.d.ts +14 -3
  63. package/lib/stores/editor/editor-state/GraphGenerationState.d.ts.map +1 -1
  64. package/lib/stores/editor/editor-state/GraphGenerationState.js +42 -5
  65. package/lib/stores/editor/editor-state/GraphGenerationState.js.map +1 -1
  66. package/lib/stores/editor/editor-state/ModelImporterState.d.ts.map +1 -1
  67. package/lib/stores/editor/editor-state/ModelImporterState.js +2 -1
  68. package/lib/stores/editor/editor-state/ModelImporterState.js.map +1 -1
  69. package/lib/stores/editor/editor-state/element-editor-state/ElementExternalFormatGenerationState.d.ts.map +1 -1
  70. package/lib/stores/editor/editor-state/element-editor-state/ElementExternalFormatGenerationState.js +14 -0
  71. package/lib/stores/editor/editor-state/element-editor-state/ElementExternalFormatGenerationState.js.map +1 -1
  72. package/lib/stores/editor/editor-state/element-editor-state/RuntimeEditorState.d.ts +35 -6
  73. package/lib/stores/editor/editor-state/element-editor-state/RuntimeEditorState.d.ts.map +1 -1
  74. package/lib/stores/editor/editor-state/element-editor-state/RuntimeEditorState.js +74 -29
  75. package/lib/stores/editor/editor-state/element-editor-state/RuntimeEditorState.js.map +1 -1
  76. package/lib/stores/editor/editor-state/element-editor-state/availability/testable/AvailabilityTestableState.d.ts +5 -0
  77. package/lib/stores/editor/editor-state/element-editor-state/availability/testable/AvailabilityTestableState.d.ts.map +1 -1
  78. package/lib/stores/editor/editor-state/element-editor-state/availability/testable/AvailabilityTestableState.js +13 -0
  79. package/lib/stores/editor/editor-state/element-editor-state/availability/testable/AvailabilityTestableState.js.map +1 -1
  80. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts +1 -0
  81. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts.map +1 -1
  82. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js +5 -5
  83. package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js.map +1 -1
  84. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts +12 -0
  85. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts.map +1 -1
  86. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js +60 -14
  87. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js.map +1 -1
  88. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.d.ts +5 -0
  89. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.d.ts.map +1 -1
  90. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.js +13 -0
  91. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.js.map +1 -1
  92. package/lib/stores/editor/editor-state/element-editor-state/function-activator/testable/FunctionTestableState.d.ts +7 -0
  93. package/lib/stores/editor/editor-state/element-editor-state/function-activator/testable/FunctionTestableState.d.ts.map +1 -1
  94. package/lib/stores/editor/editor-state/element-editor-state/function-activator/testable/FunctionTestableState.js +21 -2
  95. package/lib/stores/editor/editor-state/element-editor-state/function-activator/testable/FunctionTestableState.js.map +1 -1
  96. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestTestableState.d.ts +5 -0
  97. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestTestableState.d.ts.map +1 -1
  98. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestTestableState.js +13 -0
  99. package/lib/stores/editor/editor-state/element-editor-state/ingest/IngestTestableState.js.map +1 -1
  100. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.d.ts +7 -0
  101. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.d.ts.map +1 -1
  102. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js +34 -0
  103. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js.map +1 -1
  104. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceRegistrationState.d.ts.map +1 -1
  105. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceRegistrationState.js +48 -0
  106. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceRegistrationState.js.map +1 -1
  107. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts +1 -1
  108. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts.map +1 -1
  109. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.js +5 -11
  110. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.js.map +1 -1
  111. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.d.ts +3 -0
  112. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.d.ts.map +1 -1
  113. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js +7 -0
  114. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js.map +1 -1
  115. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.d.ts.map +1 -1
  116. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.js +46 -17
  117. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.js.map +1 -1
  118. package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.d.ts +7 -0
  119. package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.d.ts.map +1 -1
  120. package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.js +110 -16
  121. package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.js.map +1 -1
  122. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.d.ts +2 -1
  123. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.d.ts.map +1 -1
  124. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js +10 -4
  125. package/lib/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.js.map +1 -1
  126. package/lib/stores/editor/sidebar-state/BulkServiceRegistrationState.d.ts.map +1 -1
  127. package/lib/stores/editor/sidebar-state/BulkServiceRegistrationState.js +40 -1
  128. package/lib/stores/editor/sidebar-state/BulkServiceRegistrationState.js.map +1 -1
  129. package/lib/stores/editor/sidebar-state/LocalChangesState.d.ts.map +1 -1
  130. package/lib/stores/editor/sidebar-state/LocalChangesState.js +1 -0
  131. package/lib/stores/editor/sidebar-state/LocalChangesState.js.map +1 -1
  132. package/lib/stores/editor/sidebar-state/ProjectOverviewState.d.ts.map +1 -1
  133. package/lib/stores/editor/sidebar-state/ProjectOverviewState.js +51 -0
  134. package/lib/stores/editor/sidebar-state/ProjectOverviewState.js.map +1 -1
  135. package/lib/stores/editor/sidebar-state/WorkflowManagerState.d.ts +14 -0
  136. package/lib/stores/editor/sidebar-state/WorkflowManagerState.d.ts.map +1 -1
  137. package/lib/stores/editor/sidebar-state/WorkflowManagerState.js +132 -27
  138. package/lib/stores/editor/sidebar-state/WorkflowManagerState.js.map +1 -1
  139. package/lib/stores/editor/sidebar-state/WorkspaceReviewState.d.ts.map +1 -1
  140. package/lib/stores/editor/sidebar-state/WorkspaceReviewState.js +41 -0
  141. package/lib/stores/editor/sidebar-state/WorkspaceReviewState.js.map +1 -1
  142. package/lib/stores/editor/sidebar-state/testable/GlobalTestRunnerState.d.ts.map +1 -1
  143. package/lib/stores/editor/sidebar-state/testable/GlobalTestRunnerState.js +71 -9
  144. package/lib/stores/editor/sidebar-state/testable/GlobalTestRunnerState.js.map +1 -1
  145. package/lib/stores/editor/utils/MockDataUtils.d.ts +12 -2
  146. package/lib/stores/editor/utils/MockDataUtils.d.ts.map +1 -1
  147. package/lib/stores/editor/utils/MockDataUtils.js +28 -28
  148. package/lib/stores/editor/utils/MockDataUtils.js.map +1 -1
  149. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.d.ts +2 -0
  150. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.d.ts.map +1 -1
  151. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js +13 -0
  152. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js.map +1 -1
  153. package/lib/stores/graph-modifier/DSL_LakehouseRuntime_GraphModifierHelper.d.ts +20 -2
  154. package/lib/stores/graph-modifier/DSL_LakehouseRuntime_GraphModifierHelper.d.ts.map +1 -1
  155. package/lib/stores/graph-modifier/DSL_LakehouseRuntime_GraphModifierHelper.js +38 -4
  156. package/lib/stores/graph-modifier/DSL_LakehouseRuntime_GraphModifierHelper.js.map +1 -1
  157. package/lib/stores/project-reviewer/ProjectReviewerStore.d.ts.map +1 -1
  158. package/lib/stores/project-reviewer/ProjectReviewerStore.js +45 -0
  159. package/lib/stores/project-reviewer/ProjectReviewerStore.js.map +1 -1
  160. package/lib/stores/workspace-setup/WorkspaceSetupStore.d.ts.map +1 -1
  161. package/lib/stores/workspace-setup/WorkspaceSetupStore.js +48 -4
  162. package/lib/stores/workspace-setup/WorkspaceSetupStore.js.map +1 -1
  163. package/package.json +9 -9
  164. package/src/__lib__/LegendStudioEvent.ts +102 -0
  165. package/src/__lib__/LegendStudioTelemetryHelper.ts +1769 -311
  166. package/src/components/editor/editor-group/LegendAISuggestTelemetryHooks.ts +57 -0
  167. package/src/components/editor/editor-group/RuntimeEditor.tsx +282 -132
  168. package/src/components/editor/editor-group/dataProduct/DataProductEditor.tsx +293 -106
  169. package/src/components/editor/editor-group/dataProduct/DataProductQueryBuilderHelper.ts +3 -13
  170. package/src/components/editor/editor-group/service-editor/ServiceEditor.tsx +41 -23
  171. package/src/components/editor/editor-group/service-editor/testable/ServiceTestDataEditor.tsx +5 -11
  172. package/src/components/editor/side-bar/WorkflowManager.tsx +24 -0
  173. package/src/index.ts +17 -1
  174. package/src/stores/editor/EditorGraphState.ts +30 -1
  175. package/src/stores/editor/EditorStore.ts +22 -0
  176. package/src/stores/editor/EditorTabManagerState.ts +128 -1
  177. package/src/stores/editor/EditorTabTelemetryHelper.ts +70 -0
  178. package/src/stores/editor/GraphEditFormModeState.ts +35 -1
  179. package/src/stores/editor/LegendAISuggestTelemetry.ts +592 -0
  180. package/src/stores/editor/LegendSQLStudioPlaygroundState.ts +3 -3
  181. package/src/stores/editor/editor-state/GraphGenerationState.ts +68 -9
  182. package/src/stores/editor/editor-state/ModelImporterState.ts +2 -0
  183. package/src/stores/editor/editor-state/element-editor-state/ElementExternalFormatGenerationState.ts +30 -0
  184. package/src/stores/editor/editor-state/element-editor-state/RuntimeEditorState.ts +92 -31
  185. package/src/stores/editor/editor-state/element-editor-state/availability/testable/AvailabilityTestableState.ts +17 -0
  186. package/src/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.ts +6 -6
  187. package/src/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts +75 -17
  188. package/src/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.ts +17 -0
  189. package/src/stores/editor/editor-state/element-editor-state/function-activator/testable/FunctionTestableState.ts +27 -2
  190. package/src/stores/editor/editor-state/element-editor-state/ingest/IngestTestableState.ts +17 -0
  191. package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.ts +57 -0
  192. package/src/stores/editor/editor-state/element-editor-state/service/ServiceRegistrationState.ts +74 -0
  193. package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts +22 -21
  194. package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.ts +9 -0
  195. package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.ts +78 -21
  196. package/src/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.ts +205 -18
  197. package/src/stores/editor/editor-state/project-configuration-editor-state/ProjectConfigurationEditorState.ts +38 -3
  198. package/src/stores/editor/sidebar-state/BulkServiceRegistrationState.ts +71 -1
  199. package/src/stores/editor/sidebar-state/LocalChangesState.ts +4 -0
  200. package/src/stores/editor/sidebar-state/ProjectOverviewState.ts +114 -0
  201. package/src/stores/editor/sidebar-state/WorkflowManagerState.ts +250 -29
  202. package/src/stores/editor/sidebar-state/WorkspaceReviewState.ts +84 -0
  203. package/src/stores/editor/sidebar-state/testable/GlobalTestRunnerState.ts +124 -17
  204. package/src/stores/editor/utils/MockDataUtils.ts +33 -32
  205. package/src/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.ts +18 -0
  206. package/src/stores/graph-modifier/DSL_LakehouseRuntime_GraphModifierHelper.ts +62 -7
  207. package/src/stores/project-reviewer/ProjectReviewerStore.ts +97 -0
  208. package/src/stores/workspace-setup/WorkspaceSetupStore.ts +87 -4
  209. package/tsconfig.json +3 -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,609 @@ 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
+ /** Non-engine error (e.g. network) surfaced while compiling. */
178
+ OTHER = 'other',
179
+ }
180
+
181
+ export enum GRAPH_INITIALIZATION_ERROR_KIND {
182
+ DEPENDENCY = 'dependency',
183
+ DESERIALIZATION = 'deserialization',
184
+ NETWORK = 'network',
185
+ OTHER = 'other',
186
+ }
187
+
188
+ export enum SERVICE_REGISTRATION_TRIGGER {
189
+ SINGLE = 'single',
190
+ BULK = 'bulk',
191
+ SERVICE_QUERY_EDITOR = 'service-query-editor',
192
+ }
193
+
194
+ export type ServiceRegistrationCommonData = {
195
+ trigger: SERVICE_REGISTRATION_TRIGGER;
196
+ executionMode: string | undefined;
197
+ serviceCount: number;
198
+ activatePostRegistration: boolean;
199
+ };
200
+
201
+ /**
202
+ * Per-service outcome counts for a registration run. For `single` /
203
+ * `service-query-editor` runs these are always `1` / `0` on success (a
204
+ * failed registration throws and emits `.failure` instead); `bulk` runs
205
+ * report the per-service split returned by the engine.
206
+ */
207
+ export type ServiceRegistrationOutcomeCounts = {
208
+ registeredCount: number;
209
+ failedCount: number;
210
+ /**
211
+ * Only set for `bulk` runs with `activatePostRegistration` — number of
212
+ * successfully registered services whose activation call rejected.
213
+ */
214
+ activationFailedCount?: number | undefined;
215
+ };
216
+
217
+ export type ServiceRegistrationCheckCommonData = {
218
+ servicePath: string;
219
+ envCount: number;
220
+ };
221
+
222
+ /**
223
+ * Discriminates the entry-point of `editor.generation.*` events.
224
+ * - `global`: sidebar "Generate" action, spans the whole project's generation spec
225
+ * (models + artifacts).
226
+ * - `element-schema`: per-element external-format schema regeneration from an
227
+ * element editor's "Generate" button.
228
+ */
229
+ export enum GENERATION_MODE {
230
+ GLOBAL = 'global',
231
+ ELEMENT_SCHEMA = 'element-schema',
232
+ }
233
+
234
+ export type GenerationCommonData = {
235
+ mode: GENERATION_MODE;
236
+ elementPath?: string | undefined;
237
+ generationType?: string | undefined;
238
+ /**
239
+ * Only meaningful for `global` runs — reflects whether artifact generation
240
+ * was enabled at the time the run was launched.
241
+ */
242
+ enableArtifactGeneration?: boolean | undefined;
243
+ };
244
+
245
+ /**
246
+ * High-level bucket for a Studio tab so dashboards can slice tab activity
247
+ * across element editors vs. sidecar tabs (diff viewers, artifact viewers,
248
+ * model importer, etc.) without depending on the element metamodel.
249
+ */
250
+ export enum EDITOR_TAB_KIND {
251
+ ELEMENT = 'element',
252
+ ENTITY_DIFF = 'entity-diff',
253
+ ARTIFACT_GENERATION = 'artifact-generation',
254
+ MODEL_IMPORTER = 'model-importer',
255
+ PROJECT_CONFIGURATION = 'project-configuration',
256
+ END_TO_END_WORKFLOW = 'end-to-end-workflow',
257
+ OTHER = 'other',
258
+ }
259
+
260
+ /**
261
+ * Sub-bucket for `EDITOR_TAB_KIND.ELEMENT` tabs — carried as the raw
262
+ * `PACKAGEABLE_ELEMENT_TYPE` string (e.g. `'CLASS'`, `'MAPPING'`,
263
+ * `'SERVICE'`, `'BETA_DATA_PRODUCT'`) resolved by
264
+ * `EditorGraphState.getPackageableElementType`. That classifier is
265
+ * plugin-aware, so extension-provided element kinds (DataSpace, Diagram,
266
+ * DataQuality, ...) come through with their extension-declared labels
267
+ * rather than falling into a generic `other` bucket.
268
+ */
269
+ export type EditorElementKind = string;
270
+
271
+ export enum EDITOR_TAB_OPEN_TRIGGER {
272
+ /** Default when the caller did not surface intent. */
273
+ PROGRAMMATIC = 'programmatic',
274
+ /** Tab was recreated after graph rebuild via cachedTabs recovery. */
275
+ RESTORE = 'restore',
276
+ }
277
+
278
+ export enum EDITOR_TAB_CLOSE_TRIGGER {
279
+ /** User clicked the "x" on the tab, or middle-clicked the tab strip. */
280
+ USER_CLOSE = 'user-close',
281
+ /** User invoked "Close Others" from the tab context menu. */
282
+ CLOSE_OTHERS = 'close-others',
283
+ /** User invoked "Close All" from the tab context menu. */
284
+ CLOSE_ALL = 'close-all',
285
+ /** Tabs were flushed as part of a graph rebuild (cacheAndClose). */
286
+ NAVIGATE_AWAY = 'navigate-away',
287
+ /** Programmatic close from a store method. */
288
+ PROGRAMMATIC = 'programmatic',
289
+ }
290
+
291
+ export type EditorTabCommonData = {
292
+ tabKind: EDITOR_TAB_KIND;
293
+ elementKind?: EditorElementKind | undefined;
294
+ elementPath?: string | undefined;
295
+ };
296
+
297
+ export enum WORKFLOW_MANAGER_SCOPE {
298
+ WORKSPACE = 'workspace',
299
+ PROJECT = 'project',
300
+ PROJECT_VERSION = 'project-version',
301
+ }
302
+
303
+ export enum WORKFLOW_MANAGER_JOB_ACTION {
304
+ RETRY = 'retry',
305
+ CANCEL = 'cancel',
306
+ RUN_MANUAL = 'run-manual',
307
+ }
308
+
309
+ export type WorkflowManagerStatusBreakdown = Record<string, number>;
310
+
311
+ /**
312
+ * SDLC review actions. `create` only fires from the author side;
313
+ * `approve` / `reopen` fire only from the reviewer side; `commit` and
314
+ * `close` fire from both.
315
+ */
316
+ export enum SDLC_REVIEW_ACTION {
317
+ CREATE = 'create',
318
+ COMMIT = 'commit',
319
+ CLOSE = 'close',
320
+ REOPEN = 'reopen',
321
+ APPROVE = 'approve',
322
+ }
323
+
324
+ /**
325
+ * Which side of the review the event fires from — the workspace author
326
+ * committing/closing their own review, or a reviewer approving / committing
327
+ * / reopening / closing someone else's review.
328
+ */
329
+ export enum SDLC_REVIEW_ROLE {
330
+ AUTHOR = 'author',
331
+ REVIEWER = 'reviewer',
332
+ }
333
+
334
+ type SdlcReviewIdentityData = {
335
+ action: SDLC_REVIEW_ACTION;
336
+ role: SDLC_REVIEW_ROLE;
337
+ projectId: string;
338
+ patchReleaseVersionId?: string | undefined;
339
+ };
340
+
341
+ export type SdlcReviewActionLaunchData = SdlcReviewIdentityData & {
342
+ // Undefined on `create` launches (no id yet); populated for the other
343
+ // actions.
344
+ reviewId?: string | undefined;
345
+ };
346
+
347
+ export type SdlcReviewActionSuccessData = SdlcReviewIdentityData & {
348
+ reviewId: string;
349
+ durationMs: number;
350
+ };
351
+
352
+ export type SdlcReviewActionFailureData = SdlcReviewIdentityData & {
353
+ // Undefined on `create` failures (the server may have failed before
354
+ // assigning an id); populated for the other actions.
355
+ reviewId?: string | undefined;
356
+ errorMessage: string;
357
+ };
358
+
359
+ /**
360
+ * Workspace setup screen actions — user-triggered writes from the setup /
361
+ * project picker route. Structured replacement for the
362
+ * WORKSPACE_SETUP_FAILURE bucket plus previously-unlogged create-project
363
+ * and import-project flows.
364
+ */
365
+ export enum SETUP_ACTION {
366
+ CREATE_SANDBOX_PROJECT = 'create-sandbox-project',
367
+ CREATE_PROJECT = 'create-project',
368
+ IMPORT_PROJECT = 'import-project',
369
+ CREATE_WORKSPACE = 'create-workspace',
370
+ }
371
+
372
+ type SetupActionIdentityData = {
373
+ action: SETUP_ACTION;
374
+ // Populated for `create-workspace` (the caller passes the target project
375
+ // and workspace up front) and for `*` success events once the id is
376
+ // known; undefined otherwise.
377
+ projectId?: string | undefined;
378
+ // Only meaningful for `create-workspace` — USER / GROUP. Serialized as
379
+ // string so the enum value doesn't need to be re-exported here.
380
+ workspaceType?: string | undefined;
381
+ // Only meaningful for `create-workspace` — true when the workspace
382
+ // targets a patch branch rather than main.
383
+ hasPatchReleaseVersion?: boolean | undefined;
384
+ };
385
+
386
+ export type SetupActionLaunchData = SetupActionIdentityData;
387
+
388
+ export type SetupActionSuccessData = SetupActionIdentityData & {
389
+ durationMs: number;
390
+ };
391
+
392
+ export type SetupActionFailureData = SetupActionIdentityData & {
393
+ errorMessage: string;
394
+ };
395
+
396
+ /**
397
+ * Project configuration editor actions — user-triggered writes from the
398
+ * project configuration editor. Structured replacement for the
399
+ * SDLC_MANAGER_FAILURE bucket around config updates.
400
+ *
401
+ * The three actions map to the three top-level editor buttons; they all
402
+ * funnel through the same `updateProjectConfiguration` SDLC call, and the
403
+ * `action` field records which entry point the user came from.
404
+ */
405
+ export enum PROJECT_CONFIG_UPDATE_ACTION {
406
+ // "Update" button on the config editor: dependency add/remove, platform
407
+ // configurations, run-dependency-tests toggle.
408
+ UPDATE_CONFIGS = 'update-configs',
409
+ // "Upgrade to latest project structure" button.
410
+ UPDATE_TO_LATEST_STRUCTURE = 'update-to-latest-structure',
411
+ // "Change project type" (managed / embedded) toggle.
412
+ CHANGE_PROJECT_TYPE = 'change-project-type',
413
+ }
414
+
415
+ type ProjectConfigUpdateIdentityData = {
416
+ action: PROJECT_CONFIG_UPDATE_ACTION;
417
+ };
418
+
419
+ export type ProjectConfigUpdateLaunchData = ProjectConfigUpdateIdentityData;
420
+
421
+ export type ProjectConfigUpdateSuccessData = ProjectConfigUpdateIdentityData & {
422
+ durationMs: number;
423
+ };
424
+
425
+ export type ProjectConfigUpdateFailureData = ProjectConfigUpdateIdentityData & {
426
+ errorMessage: string;
427
+ };
428
+
429
+ /**
430
+ * Project overview sidebar SDLC writes — user-triggered actions from the
431
+ * project overview panel. Structured replacement for the
432
+ * SDLC_MANAGER_FAILURE bucket around ProjectOverviewState.
433
+ */
434
+ export enum PROJECT_OVERVIEW_ACTION {
435
+ // Delete another workspace from the overview list.
436
+ DELETE_WORKSPACE = 'delete-workspace',
437
+ // Edit project name / description / tags.
438
+ UPDATE_PROJECT = 'update-project',
439
+ // Cut a new release version (major / minor / patch semver).
440
+ CREATE_VERSION = 'create-version',
441
+ // Close out a patch branch and release it as a version.
442
+ RELEASE_PATCH = 'release-patch',
443
+ // Open a new patch branch (also creates the initial workspace on it).
444
+ CREATE_PATCH = 'create-patch',
445
+ }
446
+
447
+ type ProjectOverviewActionIdentityData = {
448
+ action: PROJECT_OVERVIEW_ACTION;
449
+ projectId: string;
450
+ // Only meaningful for `release-patch` (the patch being released) and for
451
+ // `create-patch` (the source version the patch branches from).
452
+ patchReleaseVersionId?: string | undefined;
453
+ // Only meaningful for `create-patch` (the workspace being created on the
454
+ // new patch branch) — USER / GROUP. Serialized as string so the enum
455
+ // value doesn't need to be re-exported here.
456
+ workspaceType?: string | undefined;
457
+ };
458
+
459
+ export type ProjectOverviewActionLaunchData = ProjectOverviewActionIdentityData;
460
+
461
+ export type ProjectOverviewActionSuccessData =
462
+ ProjectOverviewActionIdentityData & { durationMs: number };
463
+
464
+ export type ProjectOverviewActionFailureData =
465
+ ProjectOverviewActionIdentityData & { errorMessage: string };
466
+
467
+ /**
468
+ * Ad-hoc workspace creation from the editor bootstrap — fires when the
469
+ * user deep-links to a workspace that doesn't exist and accepts the
470
+ * "Create workspace" recovery prompt. Distinct from the setup screen's
471
+ * `SETUP_ACTION.CREATE_WORKSPACE` because it runs from a different
472
+ * surface (in-editor recovery, not the setup route) with its own
473
+ * error-handling and legacy log bucket (`WORKSPACE_SETUP_FAILURE`).
474
+ *
475
+ * No editor mode is active yet at this point, so `sourceInfo` is
476
+ * omitted — the payload carries `projectId`, `workspaceId`,
477
+ * `workspaceType`, and `hasPatchReleaseVersion` explicitly.
478
+ */
479
+ type SdlcWorkspaceCreateIdentityData = {
480
+ projectId: string;
481
+ workspaceId: string;
482
+ workspaceType: string;
483
+ hasPatchReleaseVersion: boolean;
484
+ };
485
+
486
+ export type SdlcWorkspaceCreateLaunchData = SdlcWorkspaceCreateIdentityData;
487
+
488
+ export type SdlcWorkspaceCreateSuccessData = SdlcWorkspaceCreateIdentityData & {
489
+ durationMs: number;
490
+ };
491
+
492
+ export type SdlcWorkspaceCreateFailureData = SdlcWorkspaceCreateIdentityData & {
493
+ errorMessage: string;
494
+ };
495
+
496
+ export enum SERVICE_TEST_SUITE_RUN_MODE {
497
+ RUN_SUITE = 'run-suite',
498
+ RUN_FAILING = 'run-failing',
499
+ }
500
+
501
+ export type ServiceTestSuiteRunCommonData = {
502
+ servicePath: string;
503
+ suiteId: string;
504
+ mode: SERVICE_TEST_SUITE_RUN_MODE;
505
+ testCount: number;
506
+ };
507
+
508
+ /**
509
+ * Categorises the element behind a `Testable` for the unified TESTABLE_RUN
510
+ * telemetry so downstream analytics can slice per element kind without
511
+ * relying on the element path.
512
+ */
513
+ export enum TESTABLE_KIND {
514
+ MAPPING = 'mapping',
515
+ DATA_PRODUCT = 'data-product',
516
+ INGEST = 'ingest',
517
+ FUNCTION_ACTIVATOR = 'function-activator',
518
+ AVAILABILITY = 'availability',
519
+ SERVICE = 'service',
520
+ OTHER = 'other',
521
+ }
522
+
523
+ /**
524
+ * Which kind of run was invoked from the testable editors. This mirrors the
525
+ * distinct UI actions surfaced to the user (run suite, run failing tests,
526
+ * run entire testable, run all failing suites).
527
+ */
528
+ export enum TESTABLE_RUN_MODE {
529
+ RUN_SUITE = 'run-suite',
530
+ RUN_FAILING = 'run-failing',
531
+ RUN_TESTABLE = 'run-testable',
532
+ RUN_ALL_FAILING = 'run-all-failing',
533
+ RUN_TEST = 'run-test',
534
+ }
535
+
536
+ export type TestableRunCommonData = {
537
+ testableKind: TESTABLE_KIND;
538
+ testablePath: string;
539
+ suiteId: string | undefined;
540
+ mode: TESTABLE_RUN_MODE;
541
+ testCount: number;
542
+ };
543
+
544
+ /**
545
+ * Resolves the {@link TESTABLE_KIND} label for a testable element instance.
546
+ * Falls back to `OTHER` so telemetry never blocks on an unknown subtype.
547
+ */
548
+ export const getTestableKind = (testable: Testable): TESTABLE_KIND => {
549
+ if (testable instanceof Service) {
550
+ return TESTABLE_KIND.SERVICE;
551
+ }
552
+ if (testable instanceof Mapping) {
553
+ return TESTABLE_KIND.MAPPING;
554
+ }
555
+ if (testable instanceof DataProduct) {
556
+ return TESTABLE_KIND.DATA_PRODUCT;
557
+ }
558
+ if (testable instanceof IngestDefinition) {
559
+ return TESTABLE_KIND.INGEST;
560
+ }
561
+ if (testable instanceof FunctionActivator) {
562
+ return TESTABLE_KIND.FUNCTION_ACTIVATOR;
563
+ }
564
+ if (testable instanceof Availability) {
565
+ return TESTABLE_KIND.AVAILABILITY;
566
+ }
567
+ return TESTABLE_KIND.OTHER;
568
+ };
569
+
570
+ /**
571
+ * Reads `.path` from a testable, which all real packageable-element testables
572
+ * expose. Returns an empty string if unavailable to keep telemetry non-fatal.
573
+ */
574
+ export const getTestablePath = (testable: Testable): string =>
575
+ testable instanceof PackageableElement ? testable.path : '';
576
+
577
+ /**
578
+ * Bucketises test results into passed/failed/errored counts for the unified
579
+ * TESTABLE_RUN__SUCCESS payload. Handles {@link MultiExecutionServiceTestResult}
580
+ * by tallying each key-indexed sub-result so service multi-execution runs count
581
+ * every execution rather than the wrapper.
582
+ */
583
+ export const summarizeTestResults = (
584
+ results: TestResult[],
585
+ ): { passedCount: number; failedCount: number; erroredCount: number } => {
586
+ let passedCount = 0;
587
+ let failedCount = 0;
588
+ let erroredCount = 0;
589
+ const tally = (result: TestResult): void => {
590
+ if (result instanceof TestError) {
591
+ erroredCount += 1;
592
+ } else if (result instanceof TestExecuted) {
593
+ if (result.testExecutionStatus === TestExecutionStatus.PASS) {
594
+ passedCount += 1;
595
+ } else {
596
+ failedCount += 1;
597
+ }
598
+ }
599
+ };
600
+ for (const result of results) {
601
+ if (result instanceof MultiExecutionServiceTestResult) {
602
+ result.keyIndexedTestResults.forEach(tally);
603
+ } else {
604
+ tally(result);
605
+ }
606
+ }
607
+ return { passedCount, failedCount, erroredCount };
608
+ };
609
+
610
+ /**
611
+ * Scope of a global test runner invocation from the sidebar.
612
+ */
613
+ export enum GLOBAL_TEST_RUN_SCOPE {
614
+ ALL = 'all',
615
+ DEPENDENCIES = 'dependencies',
616
+ }
617
+
618
+ export type GlobalTestRunCommonData = {
619
+ scope: GLOBAL_TEST_RUN_SCOPE;
620
+ testableCount: number;
621
+ };
622
+
623
+ /**
624
+ * Which editor surface a LegendAI suggestion was requested from.
625
+ */
626
+ export enum LEGENDAI_SUGGEST_SURFACE {
627
+ SERVICE = 'service',
628
+ DATASPACE = 'dataspace',
629
+ DATA_PRODUCT = 'data-product',
630
+ }
631
+
632
+ /**
633
+ * Which step of a suggestion request failed: serializing the model to grammar
634
+ * (done locally by the graph manager) or the LegendAI request itself.
635
+ */
636
+ export enum LEGENDAI_SUGGEST_STAGE {
637
+ SERIALIZE = 'serialize',
638
+ REQUEST = 'request',
639
+ }
640
+
641
+ export enum LEGENDAI_SUGGEST_ERROR_KIND {
642
+ /** Grammar serialization failed before LegendAI was called. */
643
+ SERIALIZATION = 'serialization',
644
+ /** HTTP 401 / 403 — the user lacks LegendAI entitlements. */
645
+ ENTITLEMENT = 'entitlement',
646
+ /** Any other HTTP 4xx. */
647
+ CLIENT = 'client',
648
+ /** HTTP 5xx. */
649
+ SERVER = 'server',
650
+ /** LegendAI answered but the suggestion was empty, so nothing was shown. */
651
+ EMPTY_RESPONSE = 'empty-response',
652
+ OTHER = 'other',
653
+ }
654
+
655
+ /**
656
+ * What the user was looking at when they left the editor without applying or
657
+ * dismissing: a request still in flight, or a suggestion already on screen.
658
+ */
659
+ export enum LEGENDAI_SUGGEST_ABANDON_PHASE {
660
+ PENDING = 'pending',
661
+ SHOWN = 'shown',
662
+ }
663
+
664
+ /**
665
+ * State of an applied suggestion's text at the time the element was pushed.
666
+ */
667
+ export enum LEGENDAI_SUGGEST_RETENTION {
668
+ UNCHANGED = 'unchanged',
669
+ EDITED = 'edited',
670
+ CLEARED = 'cleared',
671
+ ELEMENT_REMOVED = 'element-removed',
672
+ }
673
+
674
+ /**
675
+ * Data product only: how the suggested access point group metadata was matched
676
+ * to the group the user applied it on.
677
+ */
678
+ export enum LEGENDAI_SUGGEST_MATCH_STRATEGY {
679
+ NAME = 'name',
680
+ INDEX = 'index',
681
+ NONE = 'none',
682
+ }
683
+
684
+ /**
685
+ * Identifies the editor target a suggestion is about. `accessPointGroupId` is
686
+ * only set for data product suggestions, which are launched per access point
687
+ * group.
688
+ */
689
+ export type LegendAISuggestTarget = {
690
+ surface: LEGENDAI_SUGGEST_SURFACE;
691
+ elementPath: string;
692
+ accessPointGroupId?: string | undefined;
693
+ };
694
+
695
+ export type LegendAISuggestIdentity = LegendAISuggestTarget & {
696
+ suggestionId: string;
697
+ /** 1-based count of suggestions requested from this editor instance. */
698
+ attempt: number;
699
+ };
700
+
701
+ export type LegendAISuggestExposureData = LegendAISuggestTarget & {
702
+ /** Whether a suggester plugin is installed for this surface. */
703
+ available: boolean;
704
+ isReadOnly: boolean;
705
+ };
706
+
707
+ export type LegendAISuggestLaunchData = LegendAISuggestIdentity & {
708
+ hadExistingText: boolean;
709
+ existingLength: number;
710
+ /** Data product only. */
711
+ accessPointCount?: number | undefined;
712
+ };
713
+
714
+ export type LegendAISuggestSuccessData = LegendAISuggestIdentity & {
715
+ durationMs: number;
716
+ /** Length of the grammar sent to LegendAI. */
717
+ definitionsLength: number;
718
+ suggestionLength: number;
719
+ /** Model-reported confidence, when the surface's API returns one. */
720
+ confidence?: number | undefined;
721
+ /** The user edited the target text while the request was in flight. */
722
+ editedWhilePending: boolean;
723
+ /** Data product only: number of access point suggestions for this group. */
724
+ accessPointSuggestionCount?: number | undefined;
725
+ };
726
+
727
+ export type LegendAISuggestFailureData = LegendAISuggestIdentity & {
728
+ durationMs: number;
729
+ stage: LEGENDAI_SUGGEST_STAGE;
730
+ errorKind: LEGENDAI_SUGGEST_ERROR_KIND;
731
+ httpStatus?: number | undefined;
732
+ errorMessage: string;
733
+ };
734
+
735
+ export type LegendAISuggestDataProductApplyData = {
736
+ matchStrategy: LEGENDAI_SUGGEST_MATCH_STRATEGY;
737
+ accessPointsUpdated: number;
738
+ /** Access points whose id was changed by the suggestion. */
739
+ accessPointsRenamed: number;
740
+ /** Suggested names that had to be sanitized into valid identifiers. */
741
+ namesSanitized: number;
742
+ /** Suggested access point count differs from the group's access point count. */
743
+ accessPointCountMismatch: boolean;
744
+ };
745
+
746
+ export type LegendAISuggestApplyData = LegendAISuggestIdentity &
747
+ Partial<LegendAISuggestDataProductApplyData> & {
748
+ timeToDecisionMs: number;
749
+ hadExistingText: boolean;
750
+ existingLength: number;
751
+ suggestionLength: number;
752
+ };
753
+
754
+ export type LegendAISuggestDiscardData = LegendAISuggestIdentity & {
755
+ timeToDecisionMs: number;
756
+ };
757
+
758
+ export type LegendAISuggestAbandonData = LegendAISuggestIdentity & {
759
+ phase: LEGENDAI_SUGGEST_ABANDON_PHASE;
760
+ /** Time since launch (pending) or since the suggestion was shown (shown). */
761
+ elapsedMs: number;
762
+ };
763
+
764
+ export type LegendAISuggestPersistedData = LegendAISuggestIdentity & {
765
+ retention: LEGENDAI_SUGGEST_RETENTION;
766
+ /**
767
+ * Normalized edit distance between the applied and pushed text (0 = same,
768
+ * 1 = fully rewritten). Only set for `edited`, and omitted for very long
769
+ * texts to keep the computation cheap.
770
+ */
771
+ editRatio?: number | undefined;
772
+ msSinceApply: number;
773
+ /** Earlier applies on the same target that were replaced before this push. */
774
+ supersededApplyCount: number;
775
+ };
776
+
161
777
  export class LegendStudioTelemetryHelper {
162
778
  static logEvent_GraphCompilationLaunched(
163
779
  service: TelemetryService,
@@ -197,555 +813,1397 @@ export class LegendStudioTelemetryHelper {
197
813
  });
198
814
  }
199
815
 
200
- static logEvent_TextCompilationSucceeded(
816
+ static logEvent_TextCompilationSucceeded(
817
+ service: TelemetryService,
818
+ data: Compilation_TelemetryData,
819
+ sourceInfo?: LegendSourceInfo | undefined,
820
+ ): void {
821
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE_COMPILATION__SUCCESS, {
822
+ ...data,
823
+ sourceInfo,
824
+ });
825
+ }
826
+
827
+ static logEvent_TestDataGenerationSucceeded(
828
+ service: TelemetryService,
829
+ data: TestDataGeneration_TelemetryData,
830
+ sourceInfo?: LegendSourceInfo | undefined,
831
+ ): void {
832
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TEST_DATA_GENERATION__SUCCESS, {
833
+ ...data,
834
+ sourceInfo,
835
+ });
836
+ }
837
+
838
+ static logEvent_GraphInitializationSucceeded(
839
+ service: TelemetryService,
840
+ data: GraphInitializationReport,
841
+ sourceInfo?: LegendSourceInfo | undefined,
842
+ ): void {
843
+ service.logEvent(GRAPH_MANAGER_EVENT.INITIALIZE_GRAPH__SUCCESS, {
844
+ ...data,
845
+ sourceInfo,
846
+ });
847
+ }
848
+
849
+ static logEvent_GraphInitializationLaunched(
850
+ service: TelemetryService,
851
+ sourceInfo?: LegendSourceInfo | undefined,
852
+ ): void {
853
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.INITIALIZE_GRAPH__LAUNCH, {
854
+ sourceInfo,
855
+ });
856
+ }
857
+
858
+ static logEvent_GraphInitializationFailure(
859
+ service: TelemetryService,
860
+ sourceInfo: LegendSourceInfo | undefined,
861
+ data: {
862
+ errorKind: GRAPH_INITIALIZATION_ERROR_KIND;
863
+ errorMessage: string;
864
+ fallbackToTextMode: boolean;
865
+ },
866
+ ): void {
867
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.INITIALIZE_GRAPH__FAILURE, {
868
+ sourceInfo,
869
+ ...data,
870
+ });
871
+ }
872
+
873
+ static logEvent_GraphCompilationFailure(
874
+ service: TelemetryService,
875
+ sourceInfo: LegendSourceInfo | undefined,
876
+ data: {
877
+ errorKind: FORM_MODE_COMPILATION_ERROR_KIND;
878
+ errorMessage: string;
879
+ fallbackToTextMode: boolean;
880
+ },
881
+ ): void {
882
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.FORM_MODE_COMPILATION__FAILURE, {
883
+ sourceInfo,
884
+ ...data,
885
+ });
886
+ }
887
+
888
+ static logEvent_TestDataGenerationFailure(
889
+ service: TelemetryService,
890
+ sourceInfo: LegendSourceInfo | undefined,
891
+ errorMessage: string,
892
+ ): void {
893
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TEST_DATA_GENERATION__FAILURE, {
894
+ sourceInfo,
895
+ errorMessage,
896
+ });
897
+ }
898
+
899
+ // Service registration
900
+ static logEvent_ServiceRegistrationLaunched(
901
+ service: TelemetryService,
902
+ sourceInfo: LegendSourceInfo | undefined,
903
+ data: ServiceRegistrationCommonData,
904
+ ): void {
905
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SERVICE_REGISTRATION_LAUNCH, {
906
+ sourceInfo,
907
+ ...data,
908
+ });
909
+ }
910
+
911
+ static logEvent_ServiceRegistrationSucceeded(
912
+ service: TelemetryService,
913
+ sourceInfo: LegendSourceInfo | undefined,
914
+ data: ServiceRegistrationCommonData &
915
+ ServiceRegistrationOutcomeCounts & { durationMs: number },
916
+ ): void {
917
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SERVICE_REGISTRATION_SUCCESS, {
918
+ sourceInfo,
919
+ ...data,
920
+ });
921
+ }
922
+
923
+ static logEvent_ServiceRegistrationFailure(
924
+ service: TelemetryService,
925
+ sourceInfo: LegendSourceInfo | undefined,
926
+ data: ServiceRegistrationCommonData &
927
+ Partial<ServiceRegistrationOutcomeCounts> & { errorMessage: string },
928
+ ): void {
929
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SERVICE_REGISTRATION_FAILURE, {
930
+ sourceInfo,
931
+ ...data,
932
+ });
933
+ }
934
+
935
+ // Service registration precheck ("is this service already deployed?" probed
936
+ // against every configured env). One launch and exactly one terminal event
937
+ // (success / failure) per precheck run; per-env errors are aggregated into
938
+ // `errorCount` / `failedEnvs` rather than emitted individually.
939
+ static logEvent_ServiceRegistrationCheckLaunched(
940
+ service: TelemetryService,
941
+ sourceInfo: LegendSourceInfo | undefined,
942
+ data: ServiceRegistrationCheckCommonData,
943
+ ): void {
944
+ service.logEvent(
945
+ LEGEND_STUDIO_APP_EVENT.SERVICE_REGISTRATION_CHECK_LAUNCH,
946
+ { sourceInfo, ...data },
947
+ );
948
+ }
949
+
950
+ static logEvent_ServiceRegistrationCheckSucceeded(
951
+ service: TelemetryService,
952
+ sourceInfo: LegendSourceInfo | undefined,
953
+ data: ServiceRegistrationCheckCommonData & {
954
+ durationMs: number;
955
+ registeredEnvCount: number;
956
+ errorCount: number;
957
+ failedEnvs: string[];
958
+ },
959
+ ): void {
960
+ service.logEvent(
961
+ LEGEND_STUDIO_APP_EVENT.SERVICE_REGISTRATION_CHECK_SUCCESS,
962
+ { sourceInfo, ...data },
963
+ );
964
+ }
965
+
966
+ static logEvent_ServiceRegistrationCheckFailure(
967
+ service: TelemetryService,
968
+ sourceInfo: LegendSourceInfo | undefined,
969
+ data: ServiceRegistrationCheckCommonData & {
970
+ durationMs: number;
971
+ errorCount: number;
972
+ failedEnvs: string[];
973
+ /** Message of the last per-env error encountered. */
974
+ errorMessage: string;
975
+ },
976
+ ): void {
977
+ service.logEvent(
978
+ LEGEND_STUDIO_APP_EVENT.SERVICE_REGISTRATION_CHECK_FAILURE,
979
+ { sourceInfo, ...data },
980
+ );
981
+ }
982
+
983
+ // Model / artifact / element-schema generation
984
+ static logEvent_GenerationLaunched(
985
+ service: TelemetryService,
986
+ sourceInfo: LegendSourceInfo | undefined,
987
+ data: GenerationCommonData,
988
+ ): void {
989
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.GENERATION_LAUNCH, {
990
+ sourceInfo,
991
+ ...data,
992
+ });
993
+ }
994
+
995
+ static logEvent_GenerationSucceeded(
996
+ service: TelemetryService,
997
+ sourceInfo: LegendSourceInfo | undefined,
998
+ data: GenerationCommonData & { durationMs: number },
999
+ ): void {
1000
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.GENERATION_SUCCESS, {
1001
+ sourceInfo,
1002
+ ...data,
1003
+ });
1004
+ }
1005
+
1006
+ static logEvent_GenerationFailure(
1007
+ service: TelemetryService,
1008
+ sourceInfo: LegendSourceInfo | undefined,
1009
+ data: GenerationCommonData & { errorMessage: string },
1010
+ ): void {
1011
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.GENERATION_FAILURE, {
1012
+ sourceInfo,
1013
+ ...data,
1014
+ });
1015
+ }
1016
+
1017
+ // Editor tab lifecycle
1018
+ static logEvent_EditorTabOpened(
1019
+ service: TelemetryService,
1020
+ sourceInfo: LegendSourceInfo | undefined,
1021
+ data: EditorTabCommonData & { trigger: EDITOR_TAB_OPEN_TRIGGER },
1022
+ ): void {
1023
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.EDITOR_TAB__OPEN, {
1024
+ sourceInfo,
1025
+ ...data,
1026
+ });
1027
+ }
1028
+
1029
+ static logEvent_EditorTabClosed(
1030
+ service: TelemetryService,
1031
+ sourceInfo: LegendSourceInfo | undefined,
1032
+ data: EditorTabCommonData & {
1033
+ dwellMs: number;
1034
+ trigger: EDITOR_TAB_CLOSE_TRIGGER;
1035
+ },
1036
+ ): void {
1037
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.EDITOR_TAB__CLOSE, {
1038
+ sourceInfo,
1039
+ ...data,
1040
+ });
1041
+ }
1042
+
1043
+ // showcase manager
1044
+ static logEvent_ShowcaseManagerLaunch(
1045
+ service: TelemetryService,
1046
+ data: ShowcaseMetadata_TelemetryData,
1047
+ ): void {
1048
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_LAUNCH, data);
1049
+ }
1050
+ static logEvent_ShowcaseManagerShowcaseProjectLaunch(
1051
+ service: TelemetryService,
1052
+ data: ShowcaseProject_TelemetryData,
1053
+ ): void {
1054
+ service.logEvent(
1055
+ LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_SHOWCASE_PROJECT_LAUNCH,
1056
+ data,
1057
+ );
1058
+ }
1059
+ static logEvent_ShowcaseViewerLaunch(
1060
+ service: TelemetryService,
1061
+ data: ShowcaseProject_TelemetryData,
1062
+ ): void {
1063
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SHOWCASE_VIEWER_LAUNCH, data);
1064
+ }
1065
+
1066
+ static logEvent_ShowcaseSearchInitiated(
1067
+ service: TelemetryService,
1068
+ data: ShowcaseSearchInitiated_TelemetryData,
1069
+ ): void {
1070
+ service.logEvent(
1071
+ LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_SEARCH__INITIATED,
1072
+ data,
1073
+ );
1074
+ }
1075
+
1076
+ static logEvent_ShowcaseSearchCompleted(
1077
+ service: TelemetryService,
1078
+ data: ShowcaseSearchCompleted_TelemetryData,
1079
+ ): void {
1080
+ service.logEvent(
1081
+ LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_SEARCH__COMPLETED,
1082
+ data,
1083
+ );
1084
+ }
1085
+
1086
+ static logEvent_ShowcaseViewerClose(
1087
+ service: TelemetryService,
1088
+ data: ShowcaseViewerClose_TelemetryData,
1089
+ ): void {
1090
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SHOWCASE_VIEWER_CLOSE, data);
1091
+ }
1092
+
1093
+ static logEvent_ShowcaseFeedbackSubmit(
1094
+ service: TelemetryService,
1095
+ data: ShowcaseFeedback_TelemetryData,
1096
+ ): void {
1097
+ service.logEvent(
1098
+ LEGEND_STUDIO_APP_EVENT.SHOWCASE_VIEWER_FEEDBACK__SUBMIT,
1099
+ data,
1100
+ );
1101
+ }
1102
+
1103
+ static logEvent_ShowcaseManagerInitFailure(
1104
+ service: TelemetryService,
1105
+ data: ShowcaseFailure_TelemetryData,
1106
+ ): void {
1107
+ service.logEvent(
1108
+ LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_INIT__FAILURE,
1109
+ data,
1110
+ );
1111
+ }
1112
+
1113
+ static logEvent_ShowcaseManagerOpenFailure(
1114
+ service: TelemetryService,
1115
+ data: ShowcaseFailure_TelemetryData,
1116
+ ): void {
1117
+ service.logEvent(
1118
+ LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_OPEN__FAILURE,
1119
+ data,
1120
+ );
1121
+ }
1122
+
1123
+ static logEvent_ShowcaseManagerSearchFailure(
1124
+ service: TelemetryService,
1125
+ data: ShowcaseFailure_TelemetryData,
1126
+ ): void {
1127
+ service.logEvent(
1128
+ LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_SEARCH__FAILURE,
1129
+ data,
1130
+ );
1131
+ }
1132
+
1133
+ // virtual assistant
1134
+ static logEvent_VirtualAssistantPanelOpened(service: TelemetryService): void {
1135
+ service.logEvent(APPLICATION_EVENT.VIRTUAL_ASSISTANT_PANEL__OPEN, {});
1136
+ }
1137
+
1138
+ static logEvent_VirtualAssistantPanelClosed(service: TelemetryService): void {
1139
+ service.logEvent(APPLICATION_EVENT.VIRTUAL_ASSISTANT_PANEL__CLOSE, {});
1140
+ }
1141
+
1142
+ static logEvent_VirtualAssistantTabAccessed(
1143
+ service: TelemetryService,
1144
+ tab: string,
1145
+ ): void {
1146
+ service.logEvent(APPLICATION_EVENT.VIRTUAL_ASSISTANT_TAB__ACCESS, { tab });
1147
+ }
1148
+
1149
+ static logEvent_VirtualAssistantDocumentationSearchInitiated(
1150
+ service: TelemetryService,
1151
+ searchText: string,
1152
+ ): void {
1153
+ service.logEvent(
1154
+ APPLICATION_EVENT.VIRTUAL_ASSISTANT_DOCUMENTATION_SEARCH__INITIATED,
1155
+ { searchText },
1156
+ );
1157
+ }
1158
+
1159
+ static logEvent_VirtualAssistantContextualInfoPresent(
1160
+ service: TelemetryService,
1161
+ contextKey: string,
1162
+ ): void {
1163
+ service.logEvent(
1164
+ APPLICATION_EVENT.VIRTUAL_ASSISTANT_CONTEXTUAL_INFO__PRESENT,
1165
+ { contextKey },
1166
+ );
1167
+ }
1168
+
1169
+ static logEvent_VirtualAssistantSearchResultAccessed(
1170
+ service: TelemetryService,
1171
+ data: VirtualAssistantSearchResultAccessed_TelemetryData,
1172
+ ): void {
1173
+ service.logEvent(
1174
+ APPLICATION_EVENT.VIRTUAL_ASSISTANT_SEARCH_RESULT__ACCESS,
1175
+ data,
1176
+ );
1177
+ }
1178
+
1179
+ // Legend AI
1180
+ static logEvent_ServiceLegendAISuggestLaunched(
1181
+ telemetryService: TelemetryService,
1182
+ servicePath: string,
1183
+ sourceInfo?: LegendSourceInfo | undefined,
1184
+ ): void {
1185
+ telemetryService.logEvent(
1186
+ LEGEND_STUDIO_APP_EVENT.SERVICE_LEGENDAI_SUGGEST__LAUNCH,
1187
+ { servicePath, sourceInfo },
1188
+ );
1189
+ }
1190
+
1191
+ static logEvent_ServiceLegendAISuggestApplied(
1192
+ telemetryService: TelemetryService,
1193
+ servicePath: string,
1194
+ sourceInfo?: LegendSourceInfo | undefined,
1195
+ ): void {
1196
+ telemetryService.logEvent(
1197
+ LEGEND_STUDIO_APP_EVENT.SERVICE_LEGENDAI_SUGGEST__APPLY,
1198
+ { servicePath, sourceInfo },
1199
+ );
1200
+ }
1201
+
1202
+ static logEvent_ServiceLegendAISuggestDiscarded(
1203
+ telemetryService: TelemetryService,
1204
+ servicePath: string,
1205
+ sourceInfo?: LegendSourceInfo | undefined,
1206
+ ): void {
1207
+ telemetryService.logEvent(
1208
+ LEGEND_STUDIO_APP_EVENT.SERVICE_LEGENDAI_SUGGEST__DISCARD,
1209
+ { servicePath, sourceInfo },
1210
+ );
1211
+ }
1212
+
1213
+ static logEvent_ServiceLegendAISuggestFailure(
1214
+ telemetryService: TelemetryService,
1215
+ servicePath: string,
1216
+ errorMessage: string,
1217
+ sourceInfo?: LegendSourceInfo | undefined,
1218
+ ): void {
1219
+ telemetryService.logEvent(
1220
+ LEGEND_STUDIO_APP_EVENT.SERVICE_LEGENDAI_SUGGEST__FAILURE,
1221
+ { servicePath, errorMessage, sourceInfo },
1222
+ );
1223
+ }
1224
+
1225
+ // DataSpace Legend AI
1226
+ static logEvent_DataSpaceLegendAISuggestLaunched(
1227
+ telemetryService: TelemetryService,
1228
+ dataSpacePath: string,
1229
+ sourceInfo?: LegendSourceInfo | undefined,
1230
+ ): void {
1231
+ telemetryService.logEvent(
1232
+ LEGEND_STUDIO_APP_EVENT.DATASPACE_LEGENDAI_SUGGEST__LAUNCH,
1233
+ { dataSpacePath, sourceInfo },
1234
+ );
1235
+ }
1236
+
1237
+ static logEvent_DataSpaceLegendAISuggestApplied(
1238
+ telemetryService: TelemetryService,
1239
+ dataSpacePath: string,
1240
+ sourceInfo?: LegendSourceInfo | undefined,
1241
+ ): void {
1242
+ telemetryService.logEvent(
1243
+ LEGEND_STUDIO_APP_EVENT.DATASPACE_LEGENDAI_SUGGEST__APPLY,
1244
+ { dataSpacePath, sourceInfo },
1245
+ );
1246
+ }
1247
+
1248
+ static logEvent_DataSpaceLegendAISuggestDiscarded(
1249
+ telemetryService: TelemetryService,
1250
+ dataSpacePath: string,
1251
+ sourceInfo?: LegendSourceInfo | undefined,
1252
+ ): void {
1253
+ telemetryService.logEvent(
1254
+ LEGEND_STUDIO_APP_EVENT.DATASPACE_LEGENDAI_SUGGEST__DISCARD,
1255
+ { dataSpacePath, sourceInfo },
1256
+ );
1257
+ }
1258
+
1259
+ static logEvent_DataSpaceLegendAISuggestFailure(
1260
+ telemetryService: TelemetryService,
1261
+ dataSpacePath: string,
1262
+ errorMessage: string,
1263
+ sourceInfo?: LegendSourceInfo | undefined,
1264
+ ): void {
1265
+ telemetryService.logEvent(
1266
+ LEGEND_STUDIO_APP_EVENT.DATASPACE_LEGENDAI_SUGGEST__FAILURE,
1267
+ { dataSpacePath, errorMessage, sourceInfo },
1268
+ );
1269
+ }
1270
+
1271
+ static logEvent_DataProductLegendAISuggestLaunched(
1272
+ telemetryService: TelemetryService,
1273
+ dataProductPath: string,
1274
+ sourceInfo?: LegendSourceInfo | undefined,
1275
+ ): void {
1276
+ telemetryService.logEvent(
1277
+ LEGEND_STUDIO_APP_EVENT.DATA_PRODUCT_LEGENDAI_SUGGEST__LAUNCH,
1278
+ { dataProductPath, sourceInfo },
1279
+ );
1280
+ }
1281
+
1282
+ static logEvent_DataProductLegendAISuggestApplied(
1283
+ telemetryService: TelemetryService,
1284
+ dataProductPath: string,
1285
+ sourceInfo?: LegendSourceInfo | undefined,
1286
+ ): void {
1287
+ telemetryService.logEvent(
1288
+ LEGEND_STUDIO_APP_EVENT.DATA_PRODUCT_LEGENDAI_SUGGEST__APPLY,
1289
+ { dataProductPath, sourceInfo },
1290
+ );
1291
+ }
1292
+
1293
+ static logEvent_DataProductLegendAISuggestDiscarded(
1294
+ telemetryService: TelemetryService,
1295
+ dataProductPath: string,
1296
+ sourceInfo?: LegendSourceInfo | undefined,
1297
+ ): void {
1298
+ telemetryService.logEvent(
1299
+ LEGEND_STUDIO_APP_EVENT.DATA_PRODUCT_LEGENDAI_SUGGEST__DISCARD,
1300
+ { dataProductPath, sourceInfo },
1301
+ );
1302
+ }
1303
+
1304
+ static logEvent_DataProductLegendAISuggestFailure(
1305
+ telemetryService: TelemetryService,
1306
+ dataProductPath: string,
1307
+ errorMessage: string,
1308
+ sourceInfo?: LegendSourceInfo | undefined,
1309
+ ): void {
1310
+ telemetryService.logEvent(
1311
+ LEGEND_STUDIO_APP_EVENT.DATA_PRODUCT_LEGENDAI_SUGGEST__FAILURE,
1312
+ { dataProductPath, errorMessage, sourceInfo },
1313
+ );
1314
+ }
1315
+
1316
+ // Unified LegendAI suggest (service / dataspace / data product)
1317
+ static logEvent_LegendAISuggestExposure(
1318
+ service: TelemetryService,
1319
+ sourceInfo: LegendSourceInfo | undefined,
1320
+ data: LegendAISuggestExposureData,
1321
+ ): void {
1322
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.LEGENDAI_SUGGEST__EXPOSURE, {
1323
+ sourceInfo,
1324
+ ...data,
1325
+ });
1326
+ }
1327
+
1328
+ static logEvent_LegendAISuggestLaunched(
1329
+ service: TelemetryService,
1330
+ sourceInfo: LegendSourceInfo | undefined,
1331
+ data: LegendAISuggestLaunchData,
1332
+ ): void {
1333
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.LEGENDAI_SUGGEST__LAUNCH, {
1334
+ sourceInfo,
1335
+ ...data,
1336
+ });
1337
+ }
1338
+
1339
+ static logEvent_LegendAISuggestSucceeded(
1340
+ service: TelemetryService,
1341
+ sourceInfo: LegendSourceInfo | undefined,
1342
+ data: LegendAISuggestSuccessData,
1343
+ ): void {
1344
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.LEGENDAI_SUGGEST__SUCCESS, {
1345
+ sourceInfo,
1346
+ ...data,
1347
+ });
1348
+ }
1349
+
1350
+ static logEvent_LegendAISuggestFailure(
1351
+ service: TelemetryService,
1352
+ sourceInfo: LegendSourceInfo | undefined,
1353
+ data: LegendAISuggestFailureData,
1354
+ ): void {
1355
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.LEGENDAI_SUGGEST__FAILURE, {
1356
+ sourceInfo,
1357
+ ...data,
1358
+ });
1359
+ }
1360
+
1361
+ static logEvent_LegendAISuggestApplied(
1362
+ service: TelemetryService,
1363
+ sourceInfo: LegendSourceInfo | undefined,
1364
+ data: LegendAISuggestApplyData,
1365
+ ): void {
1366
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.LEGENDAI_SUGGEST__APPLY, {
1367
+ sourceInfo,
1368
+ ...data,
1369
+ });
1370
+ }
1371
+
1372
+ static logEvent_LegendAISuggestDiscarded(
1373
+ service: TelemetryService,
1374
+ sourceInfo: LegendSourceInfo | undefined,
1375
+ data: LegendAISuggestDiscardData,
1376
+ ): void {
1377
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.LEGENDAI_SUGGEST__DISCARD, {
1378
+ sourceInfo,
1379
+ ...data,
1380
+ });
1381
+ }
1382
+
1383
+ static logEvent_LegendAISuggestAbandoned(
1384
+ service: TelemetryService,
1385
+ sourceInfo: LegendSourceInfo | undefined,
1386
+ data: LegendAISuggestAbandonData,
1387
+ ): void {
1388
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.LEGENDAI_SUGGEST__ABANDON, {
1389
+ sourceInfo,
1390
+ ...data,
1391
+ });
1392
+ }
1393
+
1394
+ static logEvent_LegendAISuggestPersisted(
1395
+ service: TelemetryService,
1396
+ sourceInfo: LegendSourceInfo | undefined,
1397
+ data: LegendAISuggestPersistedData,
1398
+ ): void {
1399
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.LEGENDAI_SUGGEST__PERSISTED, {
1400
+ sourceInfo,
1401
+ ...data,
1402
+ });
1403
+ }
1404
+
1405
+ // Push to Dev Metadata
1406
+ static logEvent_DevMetadataPushLaunched(
1407
+ service: TelemetryService,
1408
+ sourceInfo: LegendSourceInfo | undefined,
1409
+ groupId: string,
1410
+ artifactId: string,
1411
+ versionId: string | undefined,
1412
+ lakehouseElementCounts: {
1413
+ ingestCount: number;
1414
+ dataProductCount: number;
1415
+ },
1416
+ ): void {
1417
+ service.logEvent(
1418
+ LEGEND_STUDIO_APP_EVENT.METADATA_PUSH_TO_METADATA__LAUNCH,
1419
+ {
1420
+ sourceInfo,
1421
+ groupId,
1422
+ artifactId,
1423
+ versionId,
1424
+ ...lakehouseElementCounts,
1425
+ },
1426
+ );
1427
+ }
1428
+
1429
+ static logEvent_DevMetadataPushSucceeded(
1430
+ service: TelemetryService,
1431
+ sourceInfo: LegendSourceInfo | undefined,
1432
+ groupId: string,
1433
+ artifactId: string,
1434
+ versionId: string | undefined,
1435
+ status: string,
1436
+ lakehouseElementCounts: {
1437
+ ingestCount: number;
1438
+ dataProductCount: number;
1439
+ },
1440
+ ): void {
1441
+ service.logEvent(
1442
+ LEGEND_STUDIO_APP_EVENT.METADATA_PUSH_TO_METADATA__SUCCESS,
1443
+ {
1444
+ sourceInfo,
1445
+ groupId,
1446
+ artifactId,
1447
+ versionId,
1448
+ status,
1449
+ ...lakehouseElementCounts,
1450
+ },
1451
+ );
1452
+ }
1453
+
1454
+ static logEvent_DevMetadataPushFailure(
1455
+ service: TelemetryService,
1456
+ sourceInfo: LegendSourceInfo | undefined,
1457
+ errorMessage: string,
1458
+ ): void {
1459
+ service.logEvent(
1460
+ LEGEND_STUDIO_APP_EVENT.METADATA_PUSH_TO_METADATA__FAILURE,
1461
+ {
1462
+ sourceInfo,
1463
+ errorMessage,
1464
+ },
1465
+ );
1466
+ }
1467
+
1468
+ // Text mode session
1469
+ static logEvent_TextModeEntered(
1470
+ service: TelemetryService,
1471
+ sourceInfo: LegendSourceInfo | undefined,
1472
+ data: {
1473
+ trigger: TEXT_MODE_ENTER_TRIGGER;
1474
+ strict: boolean;
1475
+ elementPath?: string | undefined;
1476
+ },
1477
+ ): void {
1478
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE__ENTER, {
1479
+ sourceInfo,
1480
+ ...data,
1481
+ });
1482
+ }
1483
+
1484
+ static logEvent_TextModeLeft(
1485
+ service: TelemetryService,
1486
+ sourceInfo: LegendSourceInfo | undefined,
1487
+ data: {
1488
+ outcome: TEXT_MODE_LEAVE_OUTCOME;
1489
+ durationMs: number;
1490
+ editCount: number;
1491
+ compilationCount: number;
1492
+ },
1493
+ ): void {
1494
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE__LEAVE, {
1495
+ sourceInfo,
1496
+ ...data,
1497
+ });
1498
+ }
1499
+
1500
+ static logEvent_TextModeFirstEdit(
1501
+ service: TelemetryService,
1502
+ sourceInfo: LegendSourceInfo | undefined,
1503
+ timeToFirstEditMs: number,
1504
+ ): void {
1505
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE__FIRST_EDIT, {
1506
+ sourceInfo,
1507
+ timeToFirstEditMs,
1508
+ });
1509
+ }
1510
+
1511
+ // Push local changes (workspace save/commit)
1512
+ static logEvent_PushLocalChangesLaunched(
1513
+ service: TelemetryService,
1514
+ sourceInfo: LegendSourceInfo | undefined,
1515
+ data: { mode: GRAPH_EDITOR_MODE_LABEL; changeCount: number },
1516
+ ): void {
1517
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.PUSH_LOCAL_CHANGES__LAUNCH, {
1518
+ sourceInfo,
1519
+ ...data,
1520
+ });
1521
+ }
1522
+
1523
+ static logEvent_PushLocalChangesSucceeded(
1524
+ service: TelemetryService,
1525
+ sourceInfo: LegendSourceInfo | undefined,
1526
+ data: {
1527
+ mode: GRAPH_EDITOR_MODE_LABEL;
1528
+ changeCount: number;
1529
+ durationMs: number;
1530
+ revisionId: string | undefined;
1531
+ },
1532
+ ): void {
1533
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.PUSH_LOCAL_CHANGES__SUCCESS, {
1534
+ sourceInfo,
1535
+ ...data,
1536
+ });
1537
+ }
1538
+
1539
+ static logEvent_PushLocalChangesFailure(
1540
+ service: TelemetryService,
1541
+ sourceInfo: LegendSourceInfo | undefined,
1542
+ data: {
1543
+ mode: GRAPH_EDITOR_MODE_LABEL;
1544
+ changeCount: number;
1545
+ errorMessage: string;
1546
+ },
1547
+ ): void {
1548
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.PUSH_LOCAL_CHANGES__FAILURE, {
1549
+ sourceInfo,
1550
+ ...data,
1551
+ });
1552
+ }
1553
+
1554
+ // Workspace update (pull)
1555
+ static logEvent_WorkspaceUpdateLaunched(
1556
+ service: TelemetryService,
1557
+ sourceInfo: LegendSourceInfo | undefined,
1558
+ ): void {
1559
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.UPDATE_WORKSPACE__LAUNCH, {
1560
+ sourceInfo,
1561
+ });
1562
+ }
1563
+
1564
+ static logEvent_WorkspaceUpdateSucceeded(
201
1565
  service: TelemetryService,
202
- data: Compilation_TelemetryData,
203
- sourceInfo?: LegendSourceInfo | undefined,
1566
+ sourceInfo: LegendSourceInfo | undefined,
1567
+ data: { status: string; durationMs: number },
204
1568
  ): void {
205
- service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE_COMPILATION__SUCCESS, {
206
- ...data,
1569
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.UPDATE_WORKSPACE__SUCCESS, {
207
1570
  sourceInfo,
1571
+ ...data,
208
1572
  });
209
1573
  }
210
1574
 
211
- static logEvent_TestDataGenerationSucceeded(
1575
+ static logEvent_WorkspaceUpdateFailure(
212
1576
  service: TelemetryService,
213
- data: TestDataGeneration_TelemetryData,
214
- sourceInfo?: LegendSourceInfo | undefined,
1577
+ sourceInfo: LegendSourceInfo | undefined,
1578
+ errorMessage: string,
215
1579
  ): void {
216
- service.logEvent(LEGEND_STUDIO_APP_EVENT.TEST_DATA_GENERATION__SUCCESS, {
217
- ...data,
1580
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.UPDATE_WORKSPACE__FAILURE, {
218
1581
  sourceInfo,
1582
+ errorMessage,
219
1583
  });
220
1584
  }
221
1585
 
222
- static logEvent_GraphInitializationSucceeded(
1586
+ // Text mode - Phase 2
1587
+ static logEvent_TextModeCompilationFailure(
223
1588
  service: TelemetryService,
224
- data: GraphInitializationReport,
225
- sourceInfo?: LegendSourceInfo | undefined,
1589
+ sourceInfo: LegendSourceInfo | undefined,
1590
+ data: {
1591
+ errorKind: TEXT_MODE_COMPILATION_ERROR_KIND;
1592
+ errorMessage: string;
1593
+ },
226
1594
  ): void {
227
- service.logEvent(GRAPH_MANAGER_EVENT.INITIALIZE_GRAPH__SUCCESS, {
228
- ...data,
1595
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE_COMPILATION__FAILURE, {
229
1596
  sourceInfo,
1597
+ ...data,
230
1598
  });
231
1599
  }
232
1600
 
233
- // showcase manager
234
- static logEvent_ShowcaseManagerLaunch(
1601
+ static logEvent_TextModeStrictLaunch(
235
1602
  service: TelemetryService,
236
- data: ShowcaseMetadata_TelemetryData,
1603
+ sourceInfo: LegendSourceInfo | undefined,
237
1604
  ): void {
238
- service.logEvent(LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_LAUNCH, data);
1605
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE__STRICT_LAUNCH, {
1606
+ sourceInfo,
1607
+ });
239
1608
  }
240
- static logEvent_ShowcaseManagerShowcaseProjectLaunch(
1609
+
1610
+ static logEvent_TextModeToggleShortcutInvoked(
241
1611
  service: TelemetryService,
242
- data: ShowcaseProject_TelemetryData,
1612
+ sourceInfo: LegendSourceInfo | undefined,
1613
+ data: {
1614
+ source: TEXT_MODE_TOGGLE_SOURCE;
1615
+ direction: TEXT_MODE_TOGGLE_DIRECTION;
1616
+ },
243
1617
  ): void {
244
1618
  service.logEvent(
245
- LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_SHOWCASE_PROJECT_LAUNCH,
246
- data,
1619
+ LEGEND_STUDIO_APP_EVENT.TEXT_MODE__TOGGLE_SHORTCUT_INVOKED,
1620
+ { sourceInfo, ...data },
247
1621
  );
248
1622
  }
249
- static logEvent_ShowcaseViewerLaunch(
1623
+
1624
+ static logEvent_TextModeAction(
250
1625
  service: TelemetryService,
251
- data: ShowcaseProject_TelemetryData,
1626
+ sourceInfo: LegendSourceInfo | undefined,
1627
+ data: {
1628
+ action: TEXT_MODE_ACTION;
1629
+ status: TEXT_MODE_ACTION_STATUS;
1630
+ errorMessage?: string | undefined;
1631
+ },
252
1632
  ): void {
253
- service.logEvent(LEGEND_STUDIO_APP_EVENT.SHOWCASE_VIEWER_LAUNCH, data);
1633
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE__ACTION, {
1634
+ sourceInfo,
1635
+ ...data,
1636
+ });
254
1637
  }
255
1638
 
256
- static logEvent_ShowcaseSearchInitiated(
1639
+ // Push local changes - Phase 2
1640
+ static logEvent_PushLocalChangesEmpty(
257
1641
  service: TelemetryService,
258
- data: ShowcaseSearchInitiated_TelemetryData,
1642
+ sourceInfo: LegendSourceInfo | undefined,
1643
+ data: { mode: GRAPH_EDITOR_MODE_LABEL },
259
1644
  ): void {
260
- service.logEvent(
261
- LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_SEARCH__INITIATED,
262
- data,
263
- );
1645
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.PUSH_LOCAL_CHANGES__EMPTY, {
1646
+ sourceInfo,
1647
+ ...data,
1648
+ });
264
1649
  }
265
1650
 
266
- static logEvent_ShowcaseSearchCompleted(
1651
+ // Workflow manager
1652
+ static logEvent_WorkflowManagerPanelOpened(
267
1653
  service: TelemetryService,
268
- data: ShowcaseSearchCompleted_TelemetryData,
1654
+ sourceInfo: LegendSourceInfo | undefined,
1655
+ data: { scope: WORKFLOW_MANAGER_SCOPE },
269
1656
  ): void {
270
- service.logEvent(
271
- LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_SEARCH__COMPLETED,
272
- data,
273
- );
1657
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_PANEL__OPEN, {
1658
+ sourceInfo,
1659
+ ...data,
1660
+ });
274
1661
  }
275
1662
 
276
- static logEvent_ShowcaseViewerClose(
1663
+ static logEvent_WorkflowManagerPanelClosed(
277
1664
  service: TelemetryService,
278
- data: ShowcaseViewerClose_TelemetryData,
1665
+ sourceInfo: LegendSourceInfo | undefined,
1666
+ data: { scope: WORKFLOW_MANAGER_SCOPE; dwellMs: number },
279
1667
  ): void {
280
- service.logEvent(LEGEND_STUDIO_APP_EVENT.SHOWCASE_VIEWER_CLOSE, data);
1668
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_PANEL__CLOSE, {
1669
+ sourceInfo,
1670
+ ...data,
1671
+ });
281
1672
  }
282
1673
 
283
- static logEvent_ShowcaseFeedbackSubmit(
1674
+ static logEvent_WorkflowManagerFetchWorkflowsLaunched(
284
1675
  service: TelemetryService,
285
- data: ShowcaseFeedback_TelemetryData,
1676
+ sourceInfo: LegendSourceInfo | undefined,
1677
+ data: { scope: WORKFLOW_MANAGER_SCOPE },
286
1678
  ): void {
287
1679
  service.logEvent(
288
- LEGEND_STUDIO_APP_EVENT.SHOWCASE_VIEWER_FEEDBACK__SUBMIT,
289
- data,
1680
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_FETCH_WORKFLOWS__LAUNCH,
1681
+ { sourceInfo, ...data },
290
1682
  );
291
1683
  }
292
1684
 
293
- static logEvent_ShowcaseManagerInitFailure(
1685
+ static logEvent_WorkflowManagerFetchWorkflowsSucceeded(
294
1686
  service: TelemetryService,
295
- data: ShowcaseFailure_TelemetryData,
1687
+ sourceInfo: LegendSourceInfo | undefined,
1688
+ data: {
1689
+ scope: WORKFLOW_MANAGER_SCOPE;
1690
+ durationMs: number;
1691
+ workflowCount: number;
1692
+ statusBreakdown: WorkflowManagerStatusBreakdown;
1693
+ },
296
1694
  ): void {
297
1695
  service.logEvent(
298
- LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_INIT__FAILURE,
299
- data,
1696
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_FETCH_WORKFLOWS__SUCCESS,
1697
+ { sourceInfo, ...data },
300
1698
  );
301
1699
  }
302
1700
 
303
- static logEvent_ShowcaseManagerOpenFailure(
1701
+ static logEvent_WorkflowManagerFetchWorkflowsFailure(
304
1702
  service: TelemetryService,
305
- data: ShowcaseFailure_TelemetryData,
1703
+ sourceInfo: LegendSourceInfo | undefined,
1704
+ data: { scope: WORKFLOW_MANAGER_SCOPE; errorMessage: string },
306
1705
  ): void {
307
1706
  service.logEvent(
308
- LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_OPEN__FAILURE,
309
- data,
1707
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_FETCH_WORKFLOWS__FAILURE,
1708
+ { sourceInfo, ...data },
310
1709
  );
311
1710
  }
312
1711
 
313
- static logEvent_ShowcaseManagerSearchFailure(
1712
+ static logEvent_WorkflowManagerWorkflowExpand(
314
1713
  service: TelemetryService,
315
- data: ShowcaseFailure_TelemetryData,
1714
+ sourceInfo: LegendSourceInfo | undefined,
1715
+ data: { scope: WORKFLOW_MANAGER_SCOPE; workflowStatus: string },
316
1716
  ): void {
317
1717
  service.logEvent(
318
- LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_SEARCH__FAILURE,
319
- data,
1718
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_WORKFLOW__EXPAND,
1719
+ { sourceInfo, ...data },
320
1720
  );
321
1721
  }
322
1722
 
323
- // virtual assistant
324
- static logEvent_VirtualAssistantPanelOpened(service: TelemetryService): void {
325
- service.logEvent(APPLICATION_EVENT.VIRTUAL_ASSISTANT_PANEL__OPEN, {});
326
- }
327
-
328
- static logEvent_VirtualAssistantPanelClosed(service: TelemetryService): void {
329
- service.logEvent(APPLICATION_EVENT.VIRTUAL_ASSISTANT_PANEL__CLOSE, {});
330
- }
331
-
332
- static logEvent_VirtualAssistantTabAccessed(
333
- service: TelemetryService,
334
- tab: string,
335
- ): void {
336
- service.logEvent(APPLICATION_EVENT.VIRTUAL_ASSISTANT_TAB__ACCESS, { tab });
337
- }
338
-
339
- static logEvent_VirtualAssistantDocumentationSearchInitiated(
1723
+ static logEvent_WorkflowManagerWorkflowRefresh(
340
1724
  service: TelemetryService,
341
- searchText: string,
1725
+ sourceInfo: LegendSourceInfo | undefined,
1726
+ data: { scope: WORKFLOW_MANAGER_SCOPE; workflowStatus: string },
342
1727
  ): void {
343
1728
  service.logEvent(
344
- APPLICATION_EVENT.VIRTUAL_ASSISTANT_DOCUMENTATION_SEARCH__INITIATED,
345
- { searchText },
1729
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_WORKFLOW__REFRESH,
1730
+ { sourceInfo, ...data },
346
1731
  );
347
1732
  }
348
1733
 
349
- static logEvent_VirtualAssistantContextualInfoPresent(
1734
+ static logEvent_WorkflowManagerFetchJobsLaunched(
350
1735
  service: TelemetryService,
351
- contextKey: string,
1736
+ sourceInfo: LegendSourceInfo | undefined,
1737
+ data: { scope: WORKFLOW_MANAGER_SCOPE },
352
1738
  ): void {
353
1739
  service.logEvent(
354
- APPLICATION_EVENT.VIRTUAL_ASSISTANT_CONTEXTUAL_INFO__PRESENT,
355
- { contextKey },
1740
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_FETCH_JOBS__LAUNCH,
1741
+ { sourceInfo, ...data },
356
1742
  );
357
1743
  }
358
1744
 
359
- static logEvent_VirtualAssistantSearchResultAccessed(
1745
+ static logEvent_WorkflowManagerFetchJobsSucceeded(
360
1746
  service: TelemetryService,
361
- data: VirtualAssistantSearchResultAccessed_TelemetryData,
1747
+ sourceInfo: LegendSourceInfo | undefined,
1748
+ data: {
1749
+ scope: WORKFLOW_MANAGER_SCOPE;
1750
+ durationMs: number;
1751
+ jobCount: number;
1752
+ statusBreakdown: WorkflowManagerStatusBreakdown;
1753
+ },
362
1754
  ): void {
363
1755
  service.logEvent(
364
- APPLICATION_EVENT.VIRTUAL_ASSISTANT_SEARCH_RESULT__ACCESS,
365
- data,
366
- );
367
- }
368
-
369
- // Legend AI
370
- static logEvent_ServiceLegendAISuggestLaunched(
371
- telemetryService: TelemetryService,
372
- servicePath: string,
373
- sourceInfo?: LegendSourceInfo | undefined,
374
- ): void {
375
- telemetryService.logEvent(
376
- LEGEND_STUDIO_APP_EVENT.SERVICE_LEGENDAI_SUGGEST__LAUNCH,
377
- { servicePath, sourceInfo },
378
- );
379
- }
380
-
381
- static logEvent_ServiceLegendAISuggestApplied(
382
- telemetryService: TelemetryService,
383
- servicePath: string,
384
- sourceInfo?: LegendSourceInfo | undefined,
385
- ): void {
386
- telemetryService.logEvent(
387
- LEGEND_STUDIO_APP_EVENT.SERVICE_LEGENDAI_SUGGEST__APPLY,
388
- { servicePath, sourceInfo },
389
- );
390
- }
391
-
392
- static logEvent_ServiceLegendAISuggestDiscarded(
393
- telemetryService: TelemetryService,
394
- servicePath: string,
395
- sourceInfo?: LegendSourceInfo | undefined,
396
- ): void {
397
- telemetryService.logEvent(
398
- LEGEND_STUDIO_APP_EVENT.SERVICE_LEGENDAI_SUGGEST__DISCARD,
399
- { servicePath, sourceInfo },
400
- );
401
- }
402
-
403
- static logEvent_ServiceLegendAISuggestFailure(
404
- telemetryService: TelemetryService,
405
- servicePath: string,
406
- errorMessage: string,
407
- sourceInfo?: LegendSourceInfo | undefined,
408
- ): void {
409
- telemetryService.logEvent(
410
- LEGEND_STUDIO_APP_EVENT.SERVICE_LEGENDAI_SUGGEST__FAILURE,
411
- { servicePath, errorMessage, sourceInfo },
412
- );
413
- }
414
-
415
- // DataSpace Legend AI
416
- static logEvent_DataSpaceLegendAISuggestLaunched(
417
- telemetryService: TelemetryService,
418
- dataSpacePath: string,
419
- sourceInfo?: LegendSourceInfo | undefined,
420
- ): void {
421
- telemetryService.logEvent(
422
- LEGEND_STUDIO_APP_EVENT.DATASPACE_LEGENDAI_SUGGEST__LAUNCH,
423
- { dataSpacePath, sourceInfo },
1756
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_FETCH_JOBS__SUCCESS,
1757
+ { sourceInfo, ...data },
424
1758
  );
425
1759
  }
426
1760
 
427
- static logEvent_DataSpaceLegendAISuggestApplied(
428
- telemetryService: TelemetryService,
429
- dataSpacePath: string,
430
- sourceInfo?: LegendSourceInfo | undefined,
1761
+ static logEvent_WorkflowManagerFetchJobsFailure(
1762
+ service: TelemetryService,
1763
+ sourceInfo: LegendSourceInfo | undefined,
1764
+ data: { scope: WORKFLOW_MANAGER_SCOPE; errorMessage: string },
431
1765
  ): void {
432
- telemetryService.logEvent(
433
- LEGEND_STUDIO_APP_EVENT.DATASPACE_LEGENDAI_SUGGEST__APPLY,
434
- { dataSpacePath, sourceInfo },
1766
+ service.logEvent(
1767
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_FETCH_JOBS__FAILURE,
1768
+ { sourceInfo, ...data },
435
1769
  );
436
1770
  }
437
1771
 
438
- static logEvent_DataSpaceLegendAISuggestDiscarded(
439
- telemetryService: TelemetryService,
440
- dataSpacePath: string,
441
- sourceInfo?: LegendSourceInfo | undefined,
1772
+ static logEvent_WorkflowManagerJobActionLaunched(
1773
+ service: TelemetryService,
1774
+ sourceInfo: LegendSourceInfo | undefined,
1775
+ data: {
1776
+ scope: WORKFLOW_MANAGER_SCOPE;
1777
+ action: WORKFLOW_MANAGER_JOB_ACTION;
1778
+ jobName: string;
1779
+ jobStatus: string;
1780
+ },
442
1781
  ): void {
443
- telemetryService.logEvent(
444
- LEGEND_STUDIO_APP_EVENT.DATASPACE_LEGENDAI_SUGGEST__DISCARD,
445
- { dataSpacePath, sourceInfo },
1782
+ service.logEvent(
1783
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_JOB_ACTION__LAUNCH,
1784
+ { sourceInfo, ...data },
446
1785
  );
447
1786
  }
448
1787
 
449
- static logEvent_DataSpaceLegendAISuggestFailure(
450
- telemetryService: TelemetryService,
451
- dataSpacePath: string,
452
- errorMessage: string,
453
- sourceInfo?: LegendSourceInfo | undefined,
1788
+ static logEvent_WorkflowManagerJobActionSucceeded(
1789
+ service: TelemetryService,
1790
+ sourceInfo: LegendSourceInfo | undefined,
1791
+ data: {
1792
+ scope: WORKFLOW_MANAGER_SCOPE;
1793
+ action: WORKFLOW_MANAGER_JOB_ACTION;
1794
+ jobName: string;
1795
+ durationMs: number;
1796
+ },
454
1797
  ): void {
455
- telemetryService.logEvent(
456
- LEGEND_STUDIO_APP_EVENT.DATASPACE_LEGENDAI_SUGGEST__FAILURE,
457
- { dataSpacePath, errorMessage, sourceInfo },
1798
+ service.logEvent(
1799
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_JOB_ACTION__SUCCESS,
1800
+ { sourceInfo, ...data },
458
1801
  );
459
1802
  }
460
1803
 
461
- static logEvent_DataProductLegendAISuggestLaunched(
462
- telemetryService: TelemetryService,
463
- dataProductPath: string,
464
- sourceInfo?: LegendSourceInfo | undefined,
1804
+ static logEvent_WorkflowManagerJobActionFailure(
1805
+ service: TelemetryService,
1806
+ sourceInfo: LegendSourceInfo | undefined,
1807
+ data: {
1808
+ scope: WORKFLOW_MANAGER_SCOPE;
1809
+ action: WORKFLOW_MANAGER_JOB_ACTION;
1810
+ jobName: string;
1811
+ errorMessage: string;
1812
+ },
465
1813
  ): void {
466
- telemetryService.logEvent(
467
- LEGEND_STUDIO_APP_EVENT.DATA_PRODUCT_LEGENDAI_SUGGEST__LAUNCH,
468
- { dataProductPath, sourceInfo },
1814
+ service.logEvent(
1815
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_JOB_ACTION__FAILURE,
1816
+ { sourceInfo, ...data },
469
1817
  );
470
1818
  }
471
1819
 
472
- static logEvent_DataProductLegendAISuggestApplied(
473
- telemetryService: TelemetryService,
474
- dataProductPath: string,
475
- sourceInfo?: LegendSourceInfo | undefined,
1820
+ static logEvent_WorkflowManagerJobLogsOpened(
1821
+ service: TelemetryService,
1822
+ sourceInfo: LegendSourceInfo | undefined,
1823
+ data: {
1824
+ scope: WORKFLOW_MANAGER_SCOPE;
1825
+ jobName: string;
1826
+ jobStatus: string;
1827
+ },
476
1828
  ): void {
477
- telemetryService.logEvent(
478
- LEGEND_STUDIO_APP_EVENT.DATA_PRODUCT_LEGENDAI_SUGGEST__APPLY,
479
- { dataProductPath, sourceInfo },
480
- );
1829
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_JOB_LOGS__OPEN, {
1830
+ sourceInfo,
1831
+ ...data,
1832
+ });
481
1833
  }
482
1834
 
483
- static logEvent_DataProductLegendAISuggestDiscarded(
484
- telemetryService: TelemetryService,
485
- dataProductPath: string,
486
- sourceInfo?: LegendSourceInfo | undefined,
1835
+ static logEvent_WorkflowManagerJobLogsClosed(
1836
+ service: TelemetryService,
1837
+ sourceInfo: LegendSourceInfo | undefined,
1838
+ data: {
1839
+ scope: WORKFLOW_MANAGER_SCOPE;
1840
+ jobName: string;
1841
+ dwellMs: number;
1842
+ refreshCount: number;
1843
+ },
487
1844
  ): void {
488
- telemetryService.logEvent(
489
- LEGEND_STUDIO_APP_EVENT.DATA_PRODUCT_LEGENDAI_SUGGEST__DISCARD,
490
- { dataProductPath, sourceInfo },
491
- );
1845
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_JOB_LOGS__CLOSE, {
1846
+ sourceInfo,
1847
+ ...data,
1848
+ });
492
1849
  }
493
1850
 
494
- static logEvent_DataProductLegendAISuggestFailure(
495
- telemetryService: TelemetryService,
496
- dataProductPath: string,
497
- errorMessage: string,
498
- sourceInfo?: LegendSourceInfo | undefined,
1851
+ static logEvent_WorkflowManagerJobLogsRefresh(
1852
+ service: TelemetryService,
1853
+ sourceInfo: LegendSourceInfo | undefined,
1854
+ data: { scope: WORKFLOW_MANAGER_SCOPE; jobName: string },
499
1855
  ): void {
500
- telemetryService.logEvent(
501
- LEGEND_STUDIO_APP_EVENT.DATA_PRODUCT_LEGENDAI_SUGGEST__FAILURE,
502
- { dataProductPath, errorMessage, sourceInfo },
1856
+ service.logEvent(
1857
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_JOB_LOGS__REFRESH,
1858
+ { sourceInfo, ...data },
503
1859
  );
504
1860
  }
505
1861
 
506
- // Push to Dev Metadata
507
- static logEvent_DevMetadataPushLaunched(
1862
+ static logEvent_WorkflowManagerJobLogsFetchSucceeded(
508
1863
  service: TelemetryService,
509
1864
  sourceInfo: LegendSourceInfo | undefined,
510
- groupId: string,
511
- artifactId: string,
512
- versionId: string | undefined,
513
- lakehouseElementCounts: {
514
- ingestCount: number;
515
- dataProductCount: number;
1865
+ data: {
1866
+ scope: WORKFLOW_MANAGER_SCOPE;
1867
+ jobName: string;
1868
+ durationMs: number;
1869
+ logSizeBytes: number;
516
1870
  },
517
1871
  ): void {
518
1872
  service.logEvent(
519
- LEGEND_STUDIO_APP_EVENT.METADATA_PUSH_TO_METADATA__LAUNCH,
520
- {
521
- sourceInfo,
522
- groupId,
523
- artifactId,
524
- versionId,
525
- ...lakehouseElementCounts,
526
- },
1873
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_JOB_LOGS_FETCH__SUCCESS,
1874
+ { sourceInfo, ...data },
527
1875
  );
528
1876
  }
529
1877
 
530
- static logEvent_DevMetadataPushSucceeded(
1878
+ static logEvent_WorkflowManagerJobLogsFetchFailure(
531
1879
  service: TelemetryService,
532
1880
  sourceInfo: LegendSourceInfo | undefined,
533
- groupId: string,
534
- artifactId: string,
535
- versionId: string | undefined,
536
- status: string,
537
- lakehouseElementCounts: {
538
- ingestCount: number;
539
- dataProductCount: number;
1881
+ data: {
1882
+ scope: WORKFLOW_MANAGER_SCOPE;
1883
+ jobName: string;
1884
+ errorMessage: string;
540
1885
  },
541
1886
  ): void {
542
1887
  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
- },
1888
+ LEGEND_STUDIO_APP_EVENT.WORKFLOW_MANAGER_JOB_LOGS_FETCH__FAILURE,
1889
+ { sourceInfo, ...data },
552
1890
  );
553
1891
  }
554
1892
 
555
- static logEvent_DevMetadataPushFailure(
1893
+ // Service test suite run
1894
+ static logEvent_ServiceTestSuiteRunLaunched(
556
1895
  service: TelemetryService,
557
1896
  sourceInfo: LegendSourceInfo | undefined,
558
- errorMessage: string,
1897
+ data: ServiceTestSuiteRunCommonData,
559
1898
  ): void {
560
- service.logEvent(
561
- LEGEND_STUDIO_APP_EVENT.METADATA_PUSH_TO_METADATA__FAILURE,
562
- {
563
- sourceInfo,
564
- errorMessage,
565
- },
566
- );
1899
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SERVICE_TEST_SUITE_RUN__LAUNCH, {
1900
+ sourceInfo,
1901
+ ...data,
1902
+ });
567
1903
  }
568
1904
 
569
- // Text mode session
570
- static logEvent_TextModeEntered(
1905
+ static logEvent_ServiceTestSuiteRunSucceeded(
571
1906
  service: TelemetryService,
572
1907
  sourceInfo: LegendSourceInfo | undefined,
573
- data: {
574
- trigger: TEXT_MODE_ENTER_TRIGGER;
575
- strict: boolean;
576
- elementPath?: string | undefined;
1908
+ data: ServiceTestSuiteRunCommonData & {
1909
+ durationMs: number;
1910
+ passedCount: number;
1911
+ failedCount: number;
1912
+ erroredCount: number;
577
1913
  },
578
1914
  ): void {
579
- service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE__ENTER, {
1915
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SERVICE_TEST_SUITE_RUN__SUCCESS, {
580
1916
  sourceInfo,
581
1917
  ...data,
582
1918
  });
583
1919
  }
584
1920
 
585
- static logEvent_TextModeLeft(
1921
+ static logEvent_ServiceTestSuiteRunFailure(
586
1922
  service: TelemetryService,
587
1923
  sourceInfo: LegendSourceInfo | undefined,
588
- data: {
589
- outcome: TEXT_MODE_LEAVE_OUTCOME;
1924
+ data: ServiceTestSuiteRunCommonData & { errorMessage: string },
1925
+ ): void {
1926
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SERVICE_TEST_SUITE_RUN__FAILURE, {
1927
+ sourceInfo,
1928
+ ...data,
1929
+ });
1930
+ }
1931
+
1932
+ // Unified testable run (mapping / data product / ingest / function activator / availability)
1933
+ static logEvent_TestableRunLaunched(
1934
+ service: TelemetryService,
1935
+ sourceInfo: LegendSourceInfo | undefined,
1936
+ data: TestableRunCommonData,
1937
+ ): void {
1938
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TESTABLE_RUN__LAUNCH, {
1939
+ sourceInfo,
1940
+ ...data,
1941
+ });
1942
+ }
1943
+
1944
+ static logEvent_TestableRunSucceeded(
1945
+ service: TelemetryService,
1946
+ sourceInfo: LegendSourceInfo | undefined,
1947
+ data: TestableRunCommonData & {
590
1948
  durationMs: number;
591
- editCount: number;
592
- compilationCount: number;
1949
+ passedCount: number;
1950
+ failedCount: number;
1951
+ erroredCount: number;
593
1952
  },
594
1953
  ): void {
595
- service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE__LEAVE, {
1954
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TESTABLE_RUN__SUCCESS, {
596
1955
  sourceInfo,
597
1956
  ...data,
598
1957
  });
599
1958
  }
600
1959
 
601
- static logEvent_TextModeFirstEdit(
1960
+ static logEvent_TestableRunFailure(
602
1961
  service: TelemetryService,
603
1962
  sourceInfo: LegendSourceInfo | undefined,
604
- timeToFirstEditMs: number,
1963
+ data: TestableRunCommonData & { errorMessage: string },
605
1964
  ): void {
606
- service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE__FIRST_EDIT, {
1965
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.TESTABLE_RUN__FAILURE, {
607
1966
  sourceInfo,
608
- timeToFirstEditMs,
1967
+ ...data,
609
1968
  });
610
1969
  }
611
1970
 
612
- // Push local changes (workspace save/commit)
613
- static logEvent_PushLocalChangesLaunched(
1971
+ // Global test runner (sidebar) — cross-testable runs
1972
+ static logEvent_GlobalTestRunLaunched(
614
1973
  service: TelemetryService,
615
1974
  sourceInfo: LegendSourceInfo | undefined,
616
- data: { mode: GRAPH_EDITOR_MODE_LABEL; changeCount: number },
1975
+ data: GlobalTestRunCommonData,
617
1976
  ): void {
618
- service.logEvent(LEGEND_STUDIO_APP_EVENT.PUSH_LOCAL_CHANGES__LAUNCH, {
1977
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.GLOBAL_TEST_RUN__LAUNCH, {
619
1978
  sourceInfo,
620
1979
  ...data,
621
1980
  });
622
1981
  }
623
1982
 
624
- static logEvent_PushLocalChangesSucceeded(
1983
+ static logEvent_GlobalTestRunSucceeded(
625
1984
  service: TelemetryService,
626
1985
  sourceInfo: LegendSourceInfo | undefined,
627
- data: {
628
- mode: GRAPH_EDITOR_MODE_LABEL;
629
- changeCount: number;
1986
+ data: GlobalTestRunCommonData & {
630
1987
  durationMs: number;
631
- revisionId: string | undefined;
1988
+ passedCount: number;
1989
+ failedCount: number;
1990
+ erroredCount: number;
632
1991
  },
633
1992
  ): void {
634
- service.logEvent(LEGEND_STUDIO_APP_EVENT.PUSH_LOCAL_CHANGES__SUCCESS, {
1993
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.GLOBAL_TEST_RUN__SUCCESS, {
635
1994
  sourceInfo,
636
1995
  ...data,
637
1996
  });
638
1997
  }
639
1998
 
640
- static logEvent_PushLocalChangesFailure(
1999
+ static logEvent_GlobalTestRunFailure(
641
2000
  service: TelemetryService,
642
2001
  sourceInfo: LegendSourceInfo | undefined,
643
- data: {
644
- mode: GRAPH_EDITOR_MODE_LABEL;
645
- changeCount: number;
646
- errorMessage: string;
647
- },
2002
+ data: GlobalTestRunCommonData & { errorMessage: string },
648
2003
  ): void {
649
- service.logEvent(LEGEND_STUDIO_APP_EVENT.PUSH_LOCAL_CHANGES__FAILURE, {
2004
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.GLOBAL_TEST_RUN__FAILURE, {
650
2005
  sourceInfo,
651
2006
  ...data,
652
2007
  });
653
2008
  }
654
2009
 
655
- // Workspace update (pull)
656
- static logEvent_WorkspaceUpdateLaunched(
2010
+ // SDLC review lifecycle
2011
+ //
2012
+ // Structured replacement for the SDLC_MANAGER_FAILURE bucket around review
2013
+ // actions (create / commit / close / reopen / approve). Fires from both the
2014
+ // author side (WorkspaceReviewState — carries sourceInfo from the workspace
2015
+ // editor) and the reviewer side (ProjectReviewerStore — no editor mode, so
2016
+ // sourceInfo is undefined; projectId / patchReleaseVersionId? / reviewId
2017
+ // are carried explicitly on the payload).
2018
+ //
2019
+ // Non-lifecycle SDLC calls in the same files (fetches, refresh, workspace
2020
+ // recreation after commit) stay on the generic SDLC_MANAGER_FAILURE bucket.
2021
+ static logEvent_SdlcReviewActionLaunched(
657
2022
  service: TelemetryService,
658
2023
  sourceInfo: LegendSourceInfo | undefined,
2024
+ data: SdlcReviewActionLaunchData,
659
2025
  ): void {
660
- service.logEvent(LEGEND_STUDIO_APP_EVENT.UPDATE_WORKSPACE__LAUNCH, {
2026
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SDLC_REVIEW_ACTION__LAUNCH, {
661
2027
  sourceInfo,
2028
+ ...data,
662
2029
  });
663
2030
  }
664
2031
 
665
- static logEvent_WorkspaceUpdateSucceeded(
2032
+ static logEvent_SdlcReviewActionSucceeded(
666
2033
  service: TelemetryService,
667
2034
  sourceInfo: LegendSourceInfo | undefined,
668
- data: { status: string; durationMs: number },
2035
+ data: SdlcReviewActionSuccessData,
669
2036
  ): void {
670
- service.logEvent(LEGEND_STUDIO_APP_EVENT.UPDATE_WORKSPACE__SUCCESS, {
2037
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SDLC_REVIEW_ACTION__SUCCESS, {
671
2038
  sourceInfo,
672
2039
  ...data,
673
2040
  });
674
2041
  }
675
2042
 
676
- static logEvent_WorkspaceUpdateFailure(
2043
+ static logEvent_SdlcReviewActionFailure(
677
2044
  service: TelemetryService,
678
2045
  sourceInfo: LegendSourceInfo | undefined,
679
- errorMessage: string,
2046
+ data: SdlcReviewActionFailureData,
680
2047
  ): void {
681
- service.logEvent(LEGEND_STUDIO_APP_EVENT.UPDATE_WORKSPACE__FAILURE, {
2048
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SDLC_REVIEW_ACTION__FAILURE, {
682
2049
  sourceInfo,
683
- errorMessage,
2050
+ ...data,
684
2051
  });
685
2052
  }
686
2053
 
687
- // Text mode - Phase 2
688
- static logEvent_TextModeCompilationFailure(
2054
+ // Workspace setup screen actions
2055
+ //
2056
+ // Structured replacement for the WORKSPACE_SETUP_FAILURE bucket plus the
2057
+ // create-project / import-project flows that previously emitted no
2058
+ // telemetry at all. Fires from the setup / project picker route, before
2059
+ // any editor mode is active — so `sourceInfo` is always undefined.
2060
+ static logEvent_SetupActionLaunched(
2061
+ service: TelemetryService,
2062
+ data: SetupActionLaunchData,
2063
+ ): void {
2064
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SETUP_ACTION__LAUNCH, {
2065
+ sourceInfo: undefined,
2066
+ ...data,
2067
+ });
2068
+ }
2069
+
2070
+ static logEvent_SetupActionSucceeded(
2071
+ service: TelemetryService,
2072
+ data: SetupActionSuccessData,
2073
+ ): void {
2074
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SETUP_ACTION__SUCCESS, {
2075
+ sourceInfo: undefined,
2076
+ ...data,
2077
+ });
2078
+ }
2079
+
2080
+ static logEvent_SetupActionFailure(
2081
+ service: TelemetryService,
2082
+ data: SetupActionFailureData,
2083
+ ): void {
2084
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SETUP_ACTION__FAILURE, {
2085
+ sourceInfo: undefined,
2086
+ ...data,
2087
+ });
2088
+ }
2089
+
2090
+ // Project configuration update lifecycle
2091
+ //
2092
+ // Structured replacement for the SDLC_MANAGER_FAILURE bucket around the
2093
+ // project configuration editor's writes (dependency add/remove, platform
2094
+ // configuration, structure version bump, project type toggle). All three
2095
+ // top-level flows funnel through `updateProjectConfiguration`, which is
2096
+ // the single point where these events are emitted; the `action` field
2097
+ // records which entry point the user came from.
2098
+ static logEvent_ProjectConfigUpdateLaunched(
689
2099
  service: TelemetryService,
690
2100
  sourceInfo: LegendSourceInfo | undefined,
691
- data: {
692
- errorKind: TEXT_MODE_COMPILATION_ERROR_KIND;
693
- errorMessage: string;
694
- },
2101
+ data: ProjectConfigUpdateLaunchData,
695
2102
  ): void {
696
- service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE_COMPILATION__FAILURE, {
2103
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.PROJECT_CONFIG_UPDATE__LAUNCH, {
697
2104
  sourceInfo,
698
2105
  ...data,
699
2106
  });
700
2107
  }
701
2108
 
702
- static logEvent_TextModeStrictLaunch(
2109
+ static logEvent_ProjectConfigUpdateSucceeded(
703
2110
  service: TelemetryService,
704
2111
  sourceInfo: LegendSourceInfo | undefined,
2112
+ data: ProjectConfigUpdateSuccessData,
705
2113
  ): void {
706
- service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE__STRICT_LAUNCH, {
2114
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.PROJECT_CONFIG_UPDATE__SUCCESS, {
707
2115
  sourceInfo,
2116
+ ...data,
708
2117
  });
709
2118
  }
710
2119
 
711
- static logEvent_TextModeToggleShortcutInvoked(
2120
+ static logEvent_ProjectConfigUpdateFailure(
712
2121
  service: TelemetryService,
713
2122
  sourceInfo: LegendSourceInfo | undefined,
714
- data: {
715
- source: TEXT_MODE_TOGGLE_SOURCE;
716
- direction: TEXT_MODE_TOGGLE_DIRECTION;
717
- },
2123
+ data: ProjectConfigUpdateFailureData,
718
2124
  ): void {
719
- service.logEvent(
720
- LEGEND_STUDIO_APP_EVENT.TEXT_MODE__TOGGLE_SHORTCUT_INVOKED,
721
- { sourceInfo, ...data },
722
- );
2125
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.PROJECT_CONFIG_UPDATE__FAILURE, {
2126
+ sourceInfo,
2127
+ ...data,
2128
+ });
723
2129
  }
724
2130
 
725
- static logEvent_TextModeAction(
2131
+ // Project overview sidebar SDLC writes
2132
+ //
2133
+ // Structured replacement for the SDLC_MANAGER_FAILURE bucket around
2134
+ // ProjectOverviewState's user-triggered writes (delete workspace, update
2135
+ // project metadata, create version, release patch, create patch). Fires
2136
+ // from inside the workspace editor so `sourceInfo` is populated; the
2137
+ // payload also carries `projectId` explicitly so events remain sliceable
2138
+ // without unpacking `sourceInfo`.
2139
+ static logEvent_ProjectOverviewActionLaunched(
726
2140
  service: TelemetryService,
727
2141
  sourceInfo: LegendSourceInfo | undefined,
728
- data: {
729
- action: TEXT_MODE_ACTION;
730
- status: TEXT_MODE_ACTION_STATUS;
731
- errorMessage?: string | undefined;
732
- },
2142
+ data: ProjectOverviewActionLaunchData,
733
2143
  ): void {
734
- service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE__ACTION, {
2144
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.PROJECT_OVERVIEW_ACTION__LAUNCH, {
735
2145
  sourceInfo,
736
2146
  ...data,
737
2147
  });
738
2148
  }
739
2149
 
740
- // Push local changes - Phase 2
741
- static logEvent_PushLocalChangesEmpty(
2150
+ static logEvent_ProjectOverviewActionSucceeded(
742
2151
  service: TelemetryService,
743
2152
  sourceInfo: LegendSourceInfo | undefined,
744
- data: { mode: GRAPH_EDITOR_MODE_LABEL },
2153
+ data: ProjectOverviewActionSuccessData,
745
2154
  ): void {
746
- service.logEvent(LEGEND_STUDIO_APP_EVENT.PUSH_LOCAL_CHANGES__EMPTY, {
2155
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.PROJECT_OVERVIEW_ACTION__SUCCESS, {
2156
+ sourceInfo,
2157
+ ...data,
2158
+ });
2159
+ }
2160
+
2161
+ static logEvent_ProjectOverviewActionFailure(
2162
+ service: TelemetryService,
2163
+ sourceInfo: LegendSourceInfo | undefined,
2164
+ data: ProjectOverviewActionFailureData,
2165
+ ): void {
2166
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.PROJECT_OVERVIEW_ACTION__FAILURE, {
747
2167
  sourceInfo,
748
2168
  ...data,
749
2169
  });
750
2170
  }
2171
+
2172
+ // Ad-hoc workspace creation from the editor bootstrap
2173
+ //
2174
+ // Fires when a user deep-links to a workspace that doesn't exist and
2175
+ // picks "Create workspace" from the recovery prompt in EditorStore.
2176
+ // Distinct bucket from SETUP_ACTION.CREATE_WORKSPACE because the
2177
+ // callsite, error-handling, and legacy log bucket
2178
+ // (WORKSPACE_SETUP_FAILURE) are different. `sourceInfo` is omitted —
2179
+ // no editor mode is active yet.
2180
+ static logEvent_SdlcWorkspaceCreateLaunched(
2181
+ service: TelemetryService,
2182
+ data: SdlcWorkspaceCreateLaunchData,
2183
+ ): void {
2184
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SDLC_WORKSPACE_CREATE__LAUNCH, {
2185
+ sourceInfo: undefined,
2186
+ ...data,
2187
+ });
2188
+ }
2189
+
2190
+ static logEvent_SdlcWorkspaceCreateSucceeded(
2191
+ service: TelemetryService,
2192
+ data: SdlcWorkspaceCreateSuccessData,
2193
+ ): void {
2194
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SDLC_WORKSPACE_CREATE__SUCCESS, {
2195
+ sourceInfo: undefined,
2196
+ ...data,
2197
+ });
2198
+ }
2199
+
2200
+ static logEvent_SdlcWorkspaceCreateFailure(
2201
+ service: TelemetryService,
2202
+ data: SdlcWorkspaceCreateFailureData,
2203
+ ): void {
2204
+ service.logEvent(LEGEND_STUDIO_APP_EVENT.SDLC_WORKSPACE_CREATE__FAILURE, {
2205
+ sourceInfo: undefined,
2206
+ ...data,
2207
+ });
2208
+ }
751
2209
  }