@finos/legend-query-builder 0.6.27 → 0.6.29
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +4 -3
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.js +17 -1
- package/lib/components/QueryBuilderResultPanel.js.map +1 -1
- package/lib/graphManager/protocol/pure/QueryBuilder_PureGraphManagerExtension.d.ts +3 -3
- package/lib/graphManager/protocol/pure/QueryBuilder_PureGraphManagerExtension.d.ts.map +1 -1
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.d.ts +4 -4
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.d.ts.map +1 -1
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.js +6 -6
- package/lib/graphManager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/package.json +3 -3
- package/lib/stores/QueryBuilderEvent.d.ts +25 -0
- package/lib/stores/QueryBuilderEvent.d.ts.map +1 -0
- package/lib/stores/QueryBuilderEvent.js +26 -0
- package/lib/stores/QueryBuilderEvent.js.map +1 -0
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderResultState.js +44 -6
- package/lib/stores/QueryBuilderResultState.js.map +1 -1
- package/lib/stores/QueryBuilderState.d.ts +1 -0
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +1 -0
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/QueryBuilderTelemetry.d.ts +33 -0
- package/lib/stores/QueryBuilderTelemetry.d.ts.map +1 -0
- package/lib/stores/QueryBuilderTelemetry.js +37 -0
- package/lib/stores/QueryBuilderTelemetry.js.map +1 -0
- package/package.json +10 -10
- package/src/components/QueryBuilder.tsx +4 -5
- package/src/components/QueryBuilderResultPanel.tsx +17 -1
- package/src/graphManager/protocol/pure/QueryBuilder_PureGraphManagerExtension.ts +3 -3
- package/src/graphManager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.ts +7 -7
- package/src/index.ts +2 -0
- package/src/stores/QueryBuilderEvent.ts +26 -0
- package/src/stores/QueryBuilderResultState.ts +74 -2
- package/src/stores/QueryBuilderState.ts +2 -0
- package/src/stores/QueryBuilderTelemetry.ts +83 -0
- package/tsconfig.json +2 -0
@@ -0,0 +1,83 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
import type { GraphManagerOperationReport } from '@finos/legend-graph';
|
18
|
+
import type { TelemetryService } from '@finos/legend-shared';
|
19
|
+
import { QUERY_BUILDER_EVENT } from './QueryBuilderEvent.js';
|
20
|
+
|
21
|
+
type LaunchQueryExecution_TelemteryData = {
|
22
|
+
applicationContext?: string | undefined;
|
23
|
+
};
|
24
|
+
|
25
|
+
type QueryExecution_TelemetryData = GraphManagerOperationReport & {
|
26
|
+
dependenciesCount: number;
|
27
|
+
};
|
28
|
+
|
29
|
+
export class QueryBuilderTelemetry {
|
30
|
+
static logEvent_QueryRunLaunched(
|
31
|
+
telemetryService: TelemetryService,
|
32
|
+
data: LaunchQueryExecution_TelemteryData,
|
33
|
+
): void {
|
34
|
+
telemetryService.logEvent(QUERY_BUILDER_EVENT.RUN_QUERY__LAUNCH, data);
|
35
|
+
}
|
36
|
+
|
37
|
+
static logEvent_ExecutionPlanGenerationLaunched(
|
38
|
+
telemetryService: TelemetryService,
|
39
|
+
data: LaunchQueryExecution_TelemteryData,
|
40
|
+
): void {
|
41
|
+
telemetryService.logEvent(
|
42
|
+
QUERY_BUILDER_EVENT.GENERATE_EXECUTION_PLAN__LAUNCH,
|
43
|
+
data,
|
44
|
+
);
|
45
|
+
}
|
46
|
+
|
47
|
+
static logEvent_ExecutionPlanDebugLaunched(
|
48
|
+
telemetryService: TelemetryService,
|
49
|
+
data: LaunchQueryExecution_TelemteryData,
|
50
|
+
): void {
|
51
|
+
telemetryService.logEvent(
|
52
|
+
QUERY_BUILDER_EVENT.DEBUG_EXECUTION_PLAN__LAUNCH,
|
53
|
+
data,
|
54
|
+
);
|
55
|
+
}
|
56
|
+
|
57
|
+
static logEvent_QueryRunSucceeded(
|
58
|
+
telemetryService: TelemetryService,
|
59
|
+
data: QueryExecution_TelemetryData,
|
60
|
+
): void {
|
61
|
+
telemetryService.logEvent(QUERY_BUILDER_EVENT.RUN_QUERY__SUCCESS, data);
|
62
|
+
}
|
63
|
+
|
64
|
+
static logEvent_ExecutionPlanGenerationSucceeded(
|
65
|
+
telemetryService: TelemetryService,
|
66
|
+
data: QueryExecution_TelemetryData,
|
67
|
+
): void {
|
68
|
+
telemetryService.logEvent(
|
69
|
+
QUERY_BUILDER_EVENT.GENERATE_EXECUTION_PLAN__SUCCESS,
|
70
|
+
data,
|
71
|
+
);
|
72
|
+
}
|
73
|
+
|
74
|
+
static logEvent_ExecutionPlanDebugSucceeded(
|
75
|
+
telemetryService: TelemetryService,
|
76
|
+
data: QueryExecution_TelemetryData,
|
77
|
+
): void {
|
78
|
+
telemetryService.logEvent(
|
79
|
+
QUERY_BUILDER_EVENT.DEBUG_EXECUTION_PLAN__SUCCESS,
|
80
|
+
data,
|
81
|
+
);
|
82
|
+
}
|
83
|
+
}
|
package/tsconfig.json
CHANGED
@@ -53,6 +53,7 @@
|
|
53
53
|
"./src/stores/QueryBuilderCommand.ts",
|
54
54
|
"./src/stores/QueryBuilderConfig.ts",
|
55
55
|
"./src/stores/QueryBuilderConstantsState.ts",
|
56
|
+
"./src/stores/QueryBuilderEvent.ts",
|
56
57
|
"./src/stores/QueryBuilderGroupOperationHelper.ts",
|
57
58
|
"./src/stores/QueryBuilderParametersState.ts",
|
58
59
|
"./src/stores/QueryBuilderPreviewDataHelper.ts",
|
@@ -61,6 +62,7 @@
|
|
61
62
|
"./src/stores/QueryBuilderState.ts",
|
62
63
|
"./src/stores/QueryBuilderStateBuilder.ts",
|
63
64
|
"./src/stores/QueryBuilderStateTestUtils.ts",
|
65
|
+
"./src/stores/QueryBuilderTelemetry.ts",
|
64
66
|
"./src/stores/QueryBuilderTextEditorState.ts",
|
65
67
|
"./src/stores/QueryBuilderTypeaheadHelper.ts",
|
66
68
|
"./src/stores/QueryBuilderUnsupportedQueryState.ts",
|