Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
With Ozone insight we can print out all the logs / metrics of one specific component s (eg. scm.node-manager or scm.node-manager).
It would be great to support additional filtering capabilities where the output is filtered based on specific keys.
For example to print out all of the logs related to one datanode or related to one type of RPC request.
Filter should be a key value map (eg. --filter datanode=sjdhfhf,rpc=createChunk) which can be defined in the ozone insight CLI.
As we have no option to add additional tags to the logs (it may be supported by log4j2 but not with slf4k), the first implementation can be implemented by pattern matching.
For example in SCMNodeManager.processNodeReport contains trace/debug logs which includes the " [datanode={}]" part. This formatting convention can be used to print out the only the related information.