Commit 90e8614c authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'docs-jq-log-parsing-multilog-timesort' into 'master'

Add jq snippet to sort activity by time across multiple logs

See merge request gitlab-org/gitlab!68655
parents 6cdd2fa2 ce5e7630
...@@ -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