File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -149,11 +149,7 @@ export class ExecutionStore {
149149 ? record . endedAt . getTime ( ) - record . startedAt . getTime ( )
150150 : 0 ;
151151
152- console . log (
153- `ExecutionStore.writeToAnalytics: Writing execution ${ record . id } (status: ${ record . status } ) to dataset ${ this . getDatasetName ( ) } `
154- ) ;
155-
156- this . env . EXECUTIONS . writeDataPoint ( {
152+ const dataPoint = {
157153 indexes : [ record . organizationId , record . id ] ,
158154 blobs : [
159155 record . workflowId ,
@@ -162,7 +158,24 @@ export class ExecutionStore {
162158 ( record . error || "" ) . substring ( 0 , 2000 ) , // truncate to fit in blob
163159 ] ,
164160 doubles : [ durationMs ] ,
165- } ) ;
161+ } ;
162+
163+ console . log (
164+ `ExecutionStore.writeToAnalytics: Writing execution ${ record . id } (status: ${ record . status } ) to dataset ${ this . getDatasetName ( ) } ` ,
165+ JSON . stringify ( {
166+ orgId : record . organizationId ,
167+ executionId : record . id ,
168+ workflowId : record . workflowId ,
169+ status : record . status ,
170+ durationMs,
171+ } )
172+ ) ;
173+
174+ this . env . EXECUTIONS . writeDataPoint ( dataPoint ) ;
175+
176+ console . log (
177+ `ExecutionStore.writeToAnalytics: Successfully called writeDataPoint for ${ record . id } `
178+ ) ;
166179 } catch ( error ) {
167180 console . error (
168181 `ExecutionStore.writeToAnalytics: Failed to write ${ record . id } :` ,
You can’t perform that action at this time.
0 commit comments