Include Runtime diagnostics tool into the server #3280
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
$subject
Resolves: #2985
Currently, APIM and MI are sharing the synapse runtime for transport and message mediation. In error scenarios, it is time-consuming to gather all the information to investigate the issue. This PR is about implementing a tool that helps to generate the required data for troubleshooting issues quickly.
The Readme guide can be used to get an understanding of the tool. https://github.com/wso2/runtime-diagnostic-tool/blob/main/README.md The configurations are added by default. Once you start the server, the tool will be started as a second process and monitor the server. The diagnostics logs can be found inside /diagnostics-tool/logs. The output zip files are stored inside /diagnostics-tool/data.
High level Architecture can be found below.
There are different watcher threads running in the Diagnostic tool which monitors the server performance and logs. Once an anomaly/error log is detected, the configured Action Executors will be executed and the data will be stored in a Zip file. If a PostAction Executor (FTP, SFTP) is configured, the zip file will be uploaded to the configured location.