@finos/legend-application-studio
Version:
Legend Studio application core
99 lines • 4.2 kB
JavaScript
/**
* Copyright (c) 2020-present, Goldman Sachs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { GRAPH_MANAGER_EVENT, } from '@finos/legend-graph';
import { LEGEND_STUDIO_APP_EVENT } from './LegendStudioEvent.js';
export class LegendStudioTelemetryHelper {
static logEvent_GraphCompilationLaunched(service) {
service.logEvent(LEGEND_STUDIO_APP_EVENT.COMPILE_GRAPH__LAUNCH, {});
}
static logEvent_TextCompilationLaunched(service) {
service.logEvent(LEGEND_STUDIO_APP_EVENT.COMPILE_TEXT__LAUNCH, {});
}
static logEvent_TestDataGenerationLaunched(service) {
service.logEvent(LEGEND_STUDIO_APP_EVENT.TEST_DATA_GENERATION__LAUNCH, {});
}
static logEvent_GraphCompilationSucceeded(service, data) {
service.logEvent(LEGEND_STUDIO_APP_EVENT.FORM_MODE_COMPILATION__SUCCESS, data);
}
static logEvent_TextCompilationSucceeded(service, data) {
service.logEvent(LEGEND_STUDIO_APP_EVENT.TEXT_MODE_COMPILATION__SUCCESS, data);
}
static logEvent_TestDataGenerationSucceeded(service, data) {
service.logEvent(LEGEND_STUDIO_APP_EVENT.TEST_DATA_GENERATION__SUCCESS, data);
}
static logEvent_GraphInitializationSucceeded(service, data) {
service.logEvent(GRAPH_MANAGER_EVENT.INITIALIZE_GRAPH__SUCCESS, data);
}
// showcase manager
static logEvent_ShowcaseManagerLaunch(service, data) {
service.logEvent(LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_LAUNCH, data);
}
static logEvent_ShowcaseManagerShowcaseProjectLaunch(service, data) {
service.logEvent(LEGEND_STUDIO_APP_EVENT.SHOWCASE_MANAGER_SHOWCASE_PROJECT_LAUNCH, data);
}
static logEvent_ShowcaseViewerLaunch(service, data) {
service.logEvent(LEGEND_STUDIO_APP_EVENT.SHOWCASE_VIEWER_LAUNCH, data);
}
// Lakehouse
static logEvent_LakehouseDeployIngest(service, sourceInfo, ingestUrn, ingestDefinitionPath) {
const eventData = {
sourceInfo,
ingestUrn,
ingestDefinitionPath,
};
service.logEvent(LEGEND_STUDIO_APP_EVENT.INGESTION_DEPLOY_SUCCESS_URN, eventData);
}
static logEvent_LakehouseDeployIngestFailure(service, sourceInfo, ingestDefinitionPath, errorMessage) {
const eventData = {
sourceInfo,
ingestDefinitionPath,
errorMessage,
};
service.logEvent(LEGEND_STUDIO_APP_EVENT.INGESTION_DEPLOY_FAILURE, eventData);
}
static logEvent_LakehouseDeployDataProduct(service, sourceInfo, dataProductPath) {
const eventData = {
sourceInfo,
dataProductPath,
};
service.logEvent(LEGEND_STUDIO_APP_EVENT.DATA_PRODUCT_DEPLOY_SUCCESS, eventData);
}
static logEvent_LakehouseDeployDataProductFailure(service, sourceInfo, dataProductPath, errorMessage) {
const eventData = {
sourceInfo,
dataProductPath,
errorMessage,
};
service.logEvent(LEGEND_STUDIO_APP_EVENT.DATA_PRODUCT_DEPLOY_FAILURE, eventData);
}
// Push to Dev Metadata
static logEvent_DevMetadataPushLaunched(service, sourceInfo, groupId, artifactId, versionId, status) {
service.logEvent(LEGEND_STUDIO_APP_EVENT.METADATA_PUSH_TO_METADATA, {
sourceInfo,
groupId,
artifactId,
versionId,
status,
});
}
static logEvent_DevMetadataPushFailure(service, sourceInfo, errorMessage) {
service.logEvent(LEGEND_STUDIO_APP_EVENT.METADATA_PUSH_TO_METADATA, {
sourceInfo,
errorMessage,
});
}
}
//# sourceMappingURL=LegendStudioTelemetryHelper.js.map