@cadenza.io/core 3.0.5 → 3.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -932,6 +932,7 @@ var GraphNode = class _GraphNode extends SignalEmitter {
|
|
|
932
932
|
}
|
|
933
933
|
}
|
|
934
934
|
emitWithMetadata(signal, ctx) {
|
|
935
|
+
var _a, _b;
|
|
935
936
|
const data = { ...ctx };
|
|
936
937
|
if (!this.task.isHidden) {
|
|
937
938
|
data.__signalEmission = {
|
|
@@ -939,13 +940,16 @@ var GraphNode = class _GraphNode extends SignalEmitter {
|
|
|
939
940
|
taskVersion: this.task.version,
|
|
940
941
|
taskExecutionId: this.id
|
|
941
942
|
};
|
|
943
|
+
const context = this.context.getMetadata();
|
|
942
944
|
data.__metadata = {
|
|
943
|
-
__routineExecId: this.routineExecId
|
|
945
|
+
__routineExecId: this.routineExecId,
|
|
946
|
+
__executionTraceId: (_b = (_a = context.__metadata) == null ? void 0 : _a.__executionTraceId) != null ? _b : context.__executionTraceId
|
|
944
947
|
};
|
|
945
948
|
}
|
|
946
949
|
this.emit(signal, data);
|
|
947
950
|
}
|
|
948
951
|
emitMetricsWithMetadata(signal, ctx) {
|
|
952
|
+
var _a, _b;
|
|
949
953
|
const data = { ...ctx };
|
|
950
954
|
if (!this.task.isHidden) {
|
|
951
955
|
data.__signalEmission = {
|
|
@@ -954,8 +958,10 @@ var GraphNode = class _GraphNode extends SignalEmitter {
|
|
|
954
958
|
taskExecutionId: this.id,
|
|
955
959
|
isMetric: true
|
|
956
960
|
};
|
|
961
|
+
const context = this.context.getMetadata();
|
|
957
962
|
data.__metadata = {
|
|
958
|
-
__routineExecId: this.routineExecId
|
|
963
|
+
__routineExecId: this.routineExecId,
|
|
964
|
+
__executionTraceId: (_b = (_a = context.__metadata) == null ? void 0 : _a.__executionTraceId) != null ? _b : context.__executionTraceId
|
|
959
965
|
};
|
|
960
966
|
}
|
|
961
967
|
this.emitMetrics(signal, data);
|
|
@@ -2120,7 +2126,7 @@ var GraphRegistry = class _GraphRegistry {
|
|
|
2120
2126
|
true,
|
|
2121
2127
|
false,
|
|
2122
2128
|
true
|
|
2123
|
-
).doOn("meta.task.created")
|
|
2129
|
+
).doOn("meta.task.created");
|
|
2124
2130
|
this.tasks.set(this.registerTask.name, this.registerTask);
|
|
2125
2131
|
this.updateTaskInputSchema = Cadenza.createMetaTask(
|
|
2126
2132
|
"Update task input schema",
|
|
@@ -2333,6 +2339,9 @@ var GraphRunner = class extends SignalEmitter {
|
|
|
2333
2339
|
intent: (_j = (_i = (_h = context.__metadata) == null ? void 0 : _h.__intent) != null ? _i : context.__intent) != null ? _j : null,
|
|
2334
2340
|
context: contextData,
|
|
2335
2341
|
is_meta: isMeta
|
|
2342
|
+
},
|
|
2343
|
+
__metadata: {
|
|
2344
|
+
__executionTraceId: executionTraceId
|
|
2336
2345
|
}
|
|
2337
2346
|
});
|
|
2338
2347
|
}
|
|
@@ -2347,6 +2356,9 @@ var GraphRunner = class extends SignalEmitter {
|
|
|
2347
2356
|
previousRoutineExecution: (_l = (_k = context.__metadata) == null ? void 0 : _k.__routineExecId) != null ? _l : null,
|
|
2348
2357
|
// TODO: There is a chance this is not added to the database yet...
|
|
2349
2358
|
created: formatTimestamp(Date.now())
|
|
2359
|
+
},
|
|
2360
|
+
__metadata: {
|
|
2361
|
+
__executionTraceId: executionTraceId
|
|
2350
2362
|
}
|
|
2351
2363
|
});
|
|
2352
2364
|
}
|