-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Readme for logs #1102
Readme for logs #1102
Conversation
pkg/tools/log/Readme.md
Outdated
@@ -0,0 +1,34 @@ | |||
## Tips for reading and manipulating logs. | |||
|
|||
### Hot to understand logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, fixed
pkg/tools/log/Readme.md
Outdated
1. Applied to folder containing resulting logs. It removes lines related to Jaeger and remove lines with just spans. Also it changes file extension to be suitable for highlighters | ||
```bash | ||
for filename in *.logs; do | ||
cat "${filename}" | grep -v "Reporting span" | grep -v "Jaeger" | sed -E "s/^.*(Sep)/\1/g" > "$(echo "${filename}" | sed "s/\.logs/\.log/g")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are no more using timestamps in k8s logs, so:
cat "${filename}" | grep -v "Reporting span" | grep -v "Jaeger" | sed -E "s/^.*(Sep)/\1/g" > "$(echo "${filename}" | sed "s/\.logs/\.log/g")" | |
cat "${filename}" | grep -v "Reporting span" | grep -v "Jaeger" > "$(echo "${filename}" | sed "s/\.logs/\.log/g")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, done
ea93f2a
to
48f3b1d
Compare
Signed-off-by: Mikhail Avramenko <avramenkomihail15@gmail.com>
48f3b1d
to
337389d
Compare
pkg/tools/log/Readme.md
Outdated
3. Most of the log lines contains `[id:'some value']` which is helpful when tracing request in application chain | ||
4. It is useful to transform logs using `grep` utility to discard 'noise' logs that is not needed for analyzing(examples will be in section `Useful scripts`) | ||
5. It is helpful to install plugin to IDE which is colorizing logs. (for example ANSI highlighter for Goland) | ||
6. Message `an error during getting metadata from context: metadata is missed in ctx` - id a good criteria for separating ordinary request from refresh request(refresh do not have metadata) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... - is a good ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, done
pkg/tools/log/Readme.md
Outdated
2. It is useful to grep logs for extracting specific information that you want - by id, type, loglevel etc. For example: | ||
- get only networkService type lines | ||
```bash | ||
grep -w grep -w type:networkService some_log_file.log > another_log_file.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it a duplucation?
grep -w grep -w type:networkService some_log_file.log > another_log_file.log | |
grep -w type:networkService some_log_file.log > another_log_file.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, fixed
8991338
to
16ad32b
Compare
Signed-off-by: Mikhail Avramenko <avramenkomihail15@gmail.com>
16ad32b
to
746207f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine as a first version
…k@main PR link: networkservicemesh/sdk#1102 Commit: f264fec Author: Авраменко Михаил Date: 2021-10-14 16:25:25 +0700 Message: - Readme for logs (#1102) * added doc for logs Signed-off-by: Mikhail Avramenko <avramenkomihail15@gmail.com> * review fixes Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1102 Commit: f264fec Author: Авраменко Михаил Date: 2021-10-14 16:25:25 +0700 Message: - Readme for logs (#1102) * added doc for logs Signed-off-by: Mikhail Avramenko <avramenkomihail15@gmail.com> * review fixes Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1102 Commit: f264fec Author: Авраменко Михаил Date: 2021-10-14 16:25:25 +0700 Message: - Readme for logs (#1102) * added doc for logs Signed-off-by: Mikhail Avramenko <avramenkomihail15@gmail.com> * review fixes Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1102 Commit: f264fec Author: Авраменко Михаил Date: 2021-10-14 16:25:25 +0700 Message: - Readme for logs (#1102) * added doc for logs Signed-off-by: Mikhail Avramenko <avramenkomihail15@gmail.com> * review fixes Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1102 Commit: f264fec Author: Авраменко Михаил Date: 2021-10-14 16:25:25 +0700 Message: - Readme for logs (#1102) * added doc for logs Signed-off-by: Mikhail Avramenko <avramenkomihail15@gmail.com> * review fixes Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1102 Commit: f264fec Author: Авраменко Михаил Date: 2021-10-14 16:25:25 +0700 Message: - Readme for logs (#1102) * added doc for logs Signed-off-by: Mikhail Avramenko <avramenkomihail15@gmail.com> * review fixes Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
…k@main PR link: networkservicemesh/sdk#1102 Commit: f264fec Author: Авраменко Михаил Date: 2021-10-14 16:25:25 +0700 Message: - Readme for logs (#1102) * added doc for logs Signed-off-by: Mikhail Avramenko <avramenkomihail15@gmail.com> * review fixes Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
Signed-off-by: Mikhail Avramenko avramenkomihail15@gmail.com
Description
Added document with useful tips for analysing logs
Issue link
#1008
Types of changes