Skip to content

Commit 5c58ba1

Browse files
committed
fix: filtering trace node data based on options trace data an trace config
1 parent 8f85b6a commit 5c58ba1

6 files changed

+263
-167
lines changed

examples/authentication.json

+27-27
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,74 @@
11
[
22
{
33
"data": {
4+
"id": "registerUser_1700959367569_88728e4a-ba6f-4315-ab86-7d670b3d44f4",
5+
"label": "registerUser",
46
"inputs": [
57
"john_doe",
68
"secure_password"
79
],
810
"outputs": "User john_doe successfully registered",
9-
"startTime": "2023-11-25T01:03:39.432Z",
10-
"endTime": "2023-11-25T01:03:44.433Z",
11-
"duration": 5001.653791993856,
12-
"elapsedTime": "5 seconds and 1.654 ms",
13-
"id": "registerUser_1700874219431_1d36da54-2bac-4d4f-bfac-65f2523d90c6",
14-
"label": "registerUser",
11+
"startTime": "2023-11-26T00:42:47.569Z",
12+
"endTime": "2023-11-26T00:42:52.572Z",
13+
"duration": 5003.4342920184135,
14+
"elapsedTime": "5 seconds and 3.434 ms",
1515
"parallel": false,
1616
"abstract": false,
17-
"createTime": "2023-11-25T01:03:44.433Z"
17+
"createTime": "2023-11-26T00:42:52.574Z"
1818
},
1919
"group": "nodes"
2020
},
2121
{
2222
"data": {
23+
"id": "loginUser_1700959372574_56d9c88e-a911-4d4e-94f5-38976209c095",
24+
"label": "loginUser",
2325
"inputs": [
2426
"john_doe",
2527
"secure_password"
2628
],
2729
"outputs": "User john_doe successfully logged in",
28-
"startTime": "2023-11-25T01:03:44.433Z",
29-
"endTime": "2023-11-25T01:03:47.435Z",
30-
"duration": 3001.4909159839153,
31-
"elapsedTime": "3 seconds and 1.491 ms",
32-
"id": "loginUser_1700874224433_068689d5-2c61-4b33-a2be-8d72c8748e10",
33-
"label": "loginUser",
30+
"startTime": "2023-11-26T00:42:52.574Z",
31+
"endTime": "2023-11-26T00:42:55.575Z",
32+
"duration": 3001.52583399415,
33+
"elapsedTime": "3 seconds and 1.526 ms",
3434
"parallel": false,
3535
"abstract": false,
36-
"createTime": "2023-11-25T01:03:47.436Z"
36+
"createTime": "2023-11-26T00:42:55.576Z"
3737
},
3838
"group": "nodes"
3939
},
4040
{
4141
"data": {
42+
"id": "getUserInformation_1700959375576_93196be8-e7d4-428e-84a4-d2bae3257163",
43+
"label": "getUserInformation",
4244
"inputs": [
4345
"john_doe"
4446
],
4547
"outputs": "User Information for john_doe: Full Name - John Doe, Email - john.doe@example.com, Role - User",
46-
"startTime": "2023-11-25T01:03:47.436Z",
47-
"endTime": "2023-11-25T01:03:48.438Z",
48-
"duration": 1002.438874989748,
49-
"elapsedTime": "1 second and 2.439 ms",
50-
"id": "getUserInformation_1700874227436_30684d33-74df-45ef-a56c-4f3ad26084b8",
51-
"label": "getUserInformation",
48+
"startTime": "2023-11-26T00:42:55.576Z",
49+
"endTime": "2023-11-26T00:42:56.578Z",
50+
"duration": 1001.4693329930305,
51+
"elapsedTime": "1 second and 1.469 ms",
5252
"parallel": false,
5353
"abstract": false,
54-
"createTime": "2023-11-25T01:03:48.439Z"
54+
"createTime": "2023-11-26T00:42:56.579Z"
5555
},
5656
"group": "nodes"
5757
},
5858
{
5959
"data": {
60-
"id": "registerUser_1700874219431_1d36da54-2bac-4d4f-bfac-65f2523d90c6->loginUser_1700874224433_068689d5-2c61-4b33-a2be-8d72c8748e10",
61-
"source": "registerUser_1700874219431_1d36da54-2bac-4d4f-bfac-65f2523d90c6",
62-
"target": "loginUser_1700874224433_068689d5-2c61-4b33-a2be-8d72c8748e10",
60+
"id": "registerUser_1700959367569_88728e4a-ba6f-4315-ab86-7d670b3d44f4->loginUser_1700959372574_56d9c88e-a911-4d4e-94f5-38976209c095",
61+
"source": "registerUser_1700959367569_88728e4a-ba6f-4315-ab86-7d670b3d44f4",
62+
"target": "loginUser_1700959372574_56d9c88e-a911-4d4e-94f5-38976209c095",
6363
"parallel": false
6464
},
6565
"group": "edges"
6666
},
6767
{
6868
"data": {
69-
"id": "loginUser_1700874224433_068689d5-2c61-4b33-a2be-8d72c8748e10->getUserInformation_1700874227436_30684d33-74df-45ef-a56c-4f3ad26084b8",
70-
"source": "loginUser_1700874224433_068689d5-2c61-4b33-a2be-8d72c8748e10",
71-
"target": "getUserInformation_1700874227436_30684d33-74df-45ef-a56c-4f3ad26084b8",
69+
"id": "loginUser_1700959372574_56d9c88e-a911-4d4e-94f5-38976209c095->getUserInformation_1700959375576_93196be8-e7d4-428e-84a4-d2bae3257163",
70+
"source": "loginUser_1700959372574_56d9c88e-a911-4d4e-94f5-38976209c095",
71+
"target": "getUserInformation_1700959375576_93196be8-e7d4-428e-84a4-d2bae3257163",
7272
"parallel": false
7373
},
7474
"group": "edges"

examples/authentication.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import * as fs from 'fs';
2-
31
import { ExecutionEngine } from '../src';
42
import { writeTrace } from './common/writeTrace';
53

@@ -8,7 +6,7 @@ async function registerUser(username: string, password: string) {
86
await new Promise((resolve) => setTimeout(resolve, 5000));
97
return Promise.resolve(`User ${username} successfully registered`);
108
} else {
11-
Promise.reject('Invalid registration information');
9+
await Promise.reject('Invalid registration information');
1210
}
1311
}
1412

0 commit comments

Comments
 (0)