feat: Implement telemetry for execution step creation

This commit is contained in:
Faruk AYDIN
2022-05-05 01:29:47 +02:00
parent 466ffcc6bc
commit 00b8f83da5
2 changed files with 19 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ import appConfig from '../../config/app';
import Step from '../../models/step';
import Flow from '../../models/flow';
import Execution from '../../models/execution';
import ExecutionStep from '../../models/execution-step';
const WRITE_KEY = '284Py4VgK2MsNYV7xlKzyrALx0v';
const DATA_PLANE_URL = 'https://telemetry.automatisch.io/v1/batch';
@@ -86,6 +87,17 @@ class Telemetry {
updatedAt: execution.updatedAt,
});
}
executionStepCreated(executionStep: ExecutionStep) {
this.track('executionStepCreated', {
executionStepId: executionStep.id,
executionId: executionStep.executionId,
stepId: executionStep.stepId,
status: executionStep.status,
createdAt: executionStep.createdAt,
updatedAt: executionStep.updatedAt,
});
}
}
const telemetry = new Telemetry();