Skip to content

Commit 4b429d0

Browse files
committed
fix(sequence): failures support captures
1 parent daf0ef2 commit 4b429d0

File tree

5 files changed

+45
-10
lines changed

5 files changed

+45
-10
lines changed

docs/fishbone/docs/sequences.md

+35
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,41 @@ the sequence `SW Update` will fail with error `crash` if a log message from `SYS
134134
Only a started sequence gets aborted with any of the defined failures. If the failures occur without a started sequence they are ignored.
135135
:::
136136
137+
#### failure capturing data
138+
139+
Failure filters can capture data similar to [context](#context):
140+
141+
E.g. for
142+
```jsonc {7,8,12}
143+
/get/docs/0/filters?
144+
sequences=[
145+
{
146+
"name": "SW Update",
147+
"steps":[ // one object per step...
148+
],
149+
"failures":{
150+
"crash":{ // a dlt filter definition like:
151+
"type":3, // event
152+
"apid":"SYS",
153+
"ctid":"JOUR",
154+
"payloadRegex":"^process '(?<crash_process>.*?)' crashed with signal (?<crash_signal>.*)"
155+
}
156+
}
157+
}
158+
]
159+
```
160+
161+
A message like
162+
```
163+
SYS JOUR process 'foo' crashed with signal 6
164+
```
165+
166+
will lead to a failure
167+
168+
`crash: "crash_process":"foo", "crash_signal": "6"`
169+
170+
and `crash_process` and `crash_signal` are added to the [context](#context) as well.
171+
137172
### `kpi` definition
138173
139174
A `kpi` has the following attributes:

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
},
147147
"dependencies": {
148148
"@vscode/extension-telemetry": "^0.9.8",
149-
"dlt-logs-utils": "0.13.2",
149+
"dlt-logs-utils": "0.13.3",
150150
"jju": "github:mbehr1/jju#3aa4169df926e99083fdd511d7c20b5bd9ba789f",
151151
"js-yaml": "^4.1.0",
152152
"json5": "2.2.3",

src/webview/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@testing-library/jest-dom": "^5.16.5",
1414
"@testing-library/react": "^13.4.0",
1515
"@testing-library/user-event": "^14.4.3",
16-
"dlt-logs-utils": "0.13.2",
16+
"dlt-logs-utils": "0.13.3",
1717
"dompurify": "^2.4.0",
1818
"jju": "github:mbehr1/jju#3aa4169df926e99083fdd511d7c20b5bd9ba789f",
1919
"js-yaml": "^4.1.0",

src/webview/yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -4259,10 +4259,10 @@ dir-glob@^3.0.1:
42594259
dependencies:
42604260
path-type "^4.0.0"
42614261

4262-
4263-
version "0.13.2"
4264-
resolved "https://registry.yarnpkg.com/dlt-logs-utils/-/dlt-logs-utils-0.13.2.tgz#02321141fbf0c01f6918203ff5f7793b4ab36779"
4265-
integrity sha512-1daxUv0JUGu+gTHv/aqex0XqNwNXWByXeCTxF4T/jMgZkpwYXmfG3AxeI1DznDHBe4DTIEFSWWOpFwKaOrQjXw==
4262+
4263+
version "0.13.3"
4264+
resolved "https://registry.yarnpkg.com/dlt-logs-utils/-/dlt-logs-utils-0.13.3.tgz#ae24ca795273ab1e1f4cd9f539c0e3d4e4d64b49"
4265+
integrity sha512-5daTvEi6v3K0muo1Izqozz4OPCl1fp6YOfBEnB+DdE0oJBDKtbTA707vn59qJvuhKJ5QdJgh8ix3gq6GRbQ/Vw==
42664266

42674267
dlv@^1.1.3:
42684268
version "1.1.3"

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -2283,10 +2283,10 @@ dir-glob@^3.0.0, dir-glob@^3.0.1:
22832283
dependencies:
22842284
path-type "^4.0.0"
22852285

2286-
2287-
version "0.13.2"
2288-
resolved "https://registry.yarnpkg.com/dlt-logs-utils/-/dlt-logs-utils-0.13.2.tgz#02321141fbf0c01f6918203ff5f7793b4ab36779"
2289-
integrity sha512-1daxUv0JUGu+gTHv/aqex0XqNwNXWByXeCTxF4T/jMgZkpwYXmfG3AxeI1DznDHBe4DTIEFSWWOpFwKaOrQjXw==
2286+
2287+
version "0.13.3"
2288+
resolved "https://registry.yarnpkg.com/dlt-logs-utils/-/dlt-logs-utils-0.13.3.tgz#ae24ca795273ab1e1f4cd9f539c0e3d4e4d64b49"
2289+
integrity sha512-5daTvEi6v3K0muo1Izqozz4OPCl1fp6YOfBEnB+DdE0oJBDKtbTA707vn59qJvuhKJ5QdJgh8ix3gq6GRbQ/Vw==
22902290

22912291
doctrine@^3.0.0:
22922292
version "3.0.0"

0 commit comments

Comments
 (0)