feat: Implement telemetry for the creation of executions

This commit is contained in:
Faruk AYDIN
2022-05-05 01:25:22 +02:00
parent c5465513ba
commit 466ffcc6bc
2 changed files with 18 additions and 0 deletions

View File

@@ -1,6 +1,8 @@
import type { QueryContext } from 'objection';
import Base from './base';
import Flow from './flow';
import ExecutionStep from './execution-step';
import Telemetry from '../helpers/telemetry';
class Execution extends Base {
id!: string;
@@ -38,6 +40,11 @@ class Execution extends Base {
},
},
});
async $afterInsert(queryContext: QueryContext) {
await super.$afterInsert(queryContext);
Telemetry.executionCreated(this);
}
}
export default Execution;