Commit ce5e7630 authored by Greg Myers's avatar Greg Myers Committed by Achilleas Pipinellis

Add jq snippet to sort activity by time across multiple logs

parent c2dddd99
...@@ -55,6 +55,12 @@ zcat @400000006026b71d1a7af804.s | (head -1; tail -1) | jq '.time' ...@@ -55,6 +55,12 @@ zcat @400000006026b71d1a7af804.s | (head -1; tail -1) | jq '.time'
zcat some_json.log.25.gz | (head -1; tail -1) | jq '.time' zcat some_json.log.25.gz | (head -1; tail -1) | jq '.time'
``` ```
#### Get activity for correlation ID across multiple JSON logs in chronological order
```shell
grep -hR <correlationID> | jq -c -R 'fromjson?' | jq -C -s 'sort_by(.time)' | less -R
```
### Parsing `production_json.log` and `api_json.log` ### Parsing `production_json.log` and `api_json.log`
#### Find all requests with a 5XX status code #### Find all requests with a 5XX status code
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment