Open musa-asad opened 3 weeks ago
This PR was marked stale due to lack of activity.
Mind adding a screenshot of what the metrics look like in CW console?
I would have expected an append_dimensions
for the InstanceId
so Im curious how it worked without that.
Description of the issue
Public docs state that the
drop_original_metrics
feature is supported, but, when we try to run it, the config translation states it isn't allowed:Under path : /metrics/metrics_collected/statsd | Error : Additional property drop_original_metrics is not allowed
.Description of changes
I allow
drop_original_metrics
for thestatsd
metric as well as other metrics that didn't have it (collectd
andethtool
) and adjusted the CW exporter translator code to allow for this.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
I first replicated the issue and then tried running CWAgent with the following config:
The relevant errors are as follows (when we try using
drop_original_metrics
for all metrics collected):After that, I re-ran the configuration and the error didn't persist.
Then, I ran
echo "should_drop_24:123|c" | nc -u -w1 127.0.0.1 8125
andecho "should_not_drop_24:123|c" | nc -u -w1 127.0.0.1 8125
.As expected, the
should_drop_24
didn't show up in the CW console, butshould_not_drop_24
did.We also see this in the yaml file:
Requirements
Before commit the code, please do the following steps.
make fmt
andmake fmt-sh
make lint