mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(core): Do not track errored workflow executions for automated executions (no-changelog) (#6322)
* fix(core): Do not track errored workflow executions for automated executions * fix test * fix test * fix test * do not track 'Workflow execution count' event when all counts are 0 * fix test * fix test * fix test * fix test * fix test * fix test * fix test * fix test * fix test
This commit is contained in:
committed by
GitHub
parent
d94c20ada5
commit
0e4c615d0d
@@ -79,19 +79,29 @@ export class Telemetry {
|
||||
return;
|
||||
}
|
||||
|
||||
const allPromises = Object.keys(this.executionCountsBuffer).map(async (workflowId) => {
|
||||
const promise = this.track(
|
||||
'Workflow execution count',
|
||||
{
|
||||
event_version: '2',
|
||||
workflow_id: workflowId,
|
||||
...this.executionCountsBuffer[workflowId],
|
||||
},
|
||||
{ withPostHog: true },
|
||||
);
|
||||
const allPromises = Object.keys(this.executionCountsBuffer)
|
||||
.filter((workflowId) => {
|
||||
const data = this.executionCountsBuffer[workflowId];
|
||||
const sum =
|
||||
(data.manual_error?.count ?? 0) +
|
||||
(data.manual_success?.count ?? 0) +
|
||||
(data.prod_error?.count ?? 0) +
|
||||
(data.prod_success?.count ?? 0);
|
||||
return sum > 0;
|
||||
})
|
||||
.map(async (workflowId) => {
|
||||
const promise = this.track(
|
||||
'Workflow execution count',
|
||||
{
|
||||
event_version: '2',
|
||||
workflow_id: workflowId,
|
||||
...this.executionCountsBuffer[workflowId],
|
||||
},
|
||||
{ withPostHog: true },
|
||||
);
|
||||
|
||||
return promise;
|
||||
});
|
||||
return promise;
|
||||
});
|
||||
|
||||
this.executionCountsBuffer = {};
|
||||
|
||||
@@ -128,7 +138,11 @@ export class Telemetry {
|
||||
this.executionCountsBuffer[workflowId][key]!.count++;
|
||||
}
|
||||
|
||||
if (!properties.success && properties.error_node_type?.startsWith('n8n-nodes-base')) {
|
||||
if (
|
||||
!properties.success &&
|
||||
properties.is_manual &&
|
||||
properties.error_node_type?.startsWith('n8n-nodes-base')
|
||||
) {
|
||||
void this.track('Workflow execution errored', properties);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user