Skip to content
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

Decoder logging and several canary improvements #232

Merged
merged 3 commits into from
Nov 27, 2022

Conversation

TwistedTwigleg
Copy link
Contributor

Description of changes:

Makes the following changes to the MQTT code:

  • Adds additional logging around decode errors for MQTT5 for easier debugging on what caused a decoder error.

Makes the following canary adjustments:

  • Adjust canary to report OS level metrics rather than process level with a PID
    • The reason for this is that in certain environments, like mvn, tracking a PID is not sufficient and will result in the mvn process being tracked and not the thing that is actually running, even if processing is happening. This will happen for any process we want to monitor where the process spawns another process adjacent to it.
    • Another reason for this is that, in Codebuild, the only things running are going to be the Canary anyway. While we will grab things like the Python Canary Wrapper itself, these things should be consistent across Codebuild runs.
    • In the future we want to use a better solution so we can for sure just track the PID(s) we want to track and nothing else, but in the short term, we can just track OS metrics to still get usable metrics in the meantime.
  • stdout is no longer captured, causing issues where sometimes the return code would not be noticed and therefore the application monitor would wait forever for an application that already finished.
  • Capture stdout output by using a tee pipe to send the output to a file, and then read that file to add it to the canary log.
  • ===== is only printed on new runs when the canary restarts or finishes.
  • Time stamps are now Hour:Minute:Second rather than Hour-Minute-Second.
  • Metrics that track percentages have % in the logs

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@TwistedTwigleg
Copy link
Contributor Author

Thanks! Merging into main...

@TwistedTwigleg TwistedTwigleg merged commit 3bead1e into main Nov 27, 2022
@TwistedTwigleg TwistedTwigleg deleted the canary_adjustments_and_extra_logging branch November 27, 2022 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants