amazon-cloudwatch-agent
amazon-cloudwatch-agent copied to clipboard
Added LoggingExporter for AppSignals during translation time if debugging is enabled.
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, andappsignals/translator_test.go.-
common_test.gowas just run to ensure that unit test still works for the new changes incommon.go. -
logging/translator_test.gochecks to see if thelogging.gois 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.goincludes 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.
- Run
make fmtandmake fmt-sh - Run
make lint