July 2017
Beginner to intermediate
340 pages
7h 43m
English
Graypy adds some metadata fields to each log such as the following:
Graylog itself will add the hostname from which each log is received, as the source field, and a few other fields.
For a distributed system, we need to add more contextual information to be able to search efficiently in our logs. For example, knowing the username is useful to search for a sequence of calls that was made in the stack in the same user session.
This information is usually stored inside app.session in our microservices, and we can use a logging.Filter class to add it in each logging record sent to Graylog:
from flask import session ...
Read now
Unlock full access