amazon-cloudwatch-agent icon indicating copy to clipboard operation
amazon-cloudwatch-agent copied to clipboard

Added LoggingExporter for AppSignals during translation time if debugging is enabled.

Open musa-asad opened this issue 1 year ago • 0 comments

Note: This merges https://github.com/aws/amazon-cloudwatch-agent/pull/1148 into main.

Description of the issue

There is no LoggingExporter for AppSignals during translation time.

When debugging is enabled, we want to add the LoggingExporter with detailed verbosity to the translated yaml.

Description of changes

During translation:

  • Adds LoggingExporter as an exporter.
  • Adds LoggingExporter to AppSignals pipelines when debugging is enabled.

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Tests

  • Ran unit tests: common_test.go, logging/translator_test.go, and appsignals/translator_test.go.
    • common_test.go was just run to ensure that unit test still works for the new changes in common.go.
    • logging/translator_test.go checks to see if the logging.go is set up correctly and sees if the agent key missing throws an error and if enabling debugging provides the correct yaml configuration for the loggingexporter.
    • appsignals/translator_test.go includes a new check to see if the loggingexporter is appropriately added to the exporters when both appsignals and debugging are enabled.

Requirements

Before commit the code, please do the following steps.

  1. Run make fmt and make fmt-sh
  2. Run make lint

musa-asad avatar May 23 '24 20:05 musa-asad