amazon-cloudwatch-agent
amazon-cloudwatch-agent copied to clipboard
change processor to check index
Description of the issue
The JMX processor was always processing the JMX object as an array. We need to support consider when there is only one JMX object
Description of changes
Changes the processor to set the jmx object based on pipeline index
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
jmx filterprocessor unit test
(24-04-05 16:03:45) <0> [~/workspace/amazon-cloudwatch-agent/translator/translate/otel/processor/jmxfilterprocessor]
dev-dsk-vtayyare-1e-8e662f70 % go test -v
=== RUN TestTranslator
=== RUN TestTranslator/ConfigWithJmxTargetNoMetricName
=== RUN TestTranslator/ConfigWithJmxTargetWithMetricName
=== RUN TestTranslator/ConfigWithMultipleJmxTargetWithNoMetricName
=== RUN TestTranslator/ConfigWithMultipleJmxTargetAlternating
=== RUN TestTranslator/ConfigWithMultiple
=== RUN TestTranslator/WithCompleteConfig
=== RUN TestTranslator/ConfigWithNoJmxSet
--- PASS: TestTranslator (0.00s)
--- PASS: TestTranslator/ConfigWithJmxTargetNoMetricName (0.00s)
--- PASS: TestTranslator/ConfigWithJmxTargetWithMetricName (0.00s)
--- PASS: TestTranslator/ConfigWithMultipleJmxTargetWithNoMetricName (0.00s)
--- PASS: TestTranslator/ConfigWithMultipleJmxTargetAlternating (0.00s)
--- PASS: TestTranslator/ConfigWithMultiple (0.00s)
--- PASS: TestTranslator/WithCompleteConfig (0.00s)
--- PASS: TestTranslator/ConfigWithNoJmxSet (0.00s)
PASS
ok github.com/aws/amazon-cloudwatch-agent/translator/translate/otel/processor/jmxfilterprocessor 0.029s
(24-04-05 16:03:49) <0> [~/workspace/amazon-cloudwatch-agent/translator/translate/otel/processor/jmxfilterprocessor]
Requirements
Before commit the code, please do the following steps.
- Run
make fmtandmake fmt-sh - Run
make lint
This PR was marked stale due to lack of activity.
This PR was marked stale due to lack of activity.