-
Notifications
You must be signed in to change notification settings - Fork 207
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
Drop original metrics support added for all metrics. #1206
Conversation
This PR was marked stale due to lack of activity. |
Mind adding a screenshot of what the metrics look like in CW console? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you verify that that even though the original metric is being dropped, its still captured as part of the aggregation metric ?
translator/translate/otel/exporter/awscloudwatch/testdata/config.json
Outdated
Show resolved
Hide resolved
Will this parameter still drop metrics even if the |
Yeah, it will still drop those metrics. |
translator/translate/otel/exporter/awscloudwatch/testdata/config.json
Outdated
Show resolved
Hide resolved
This reverts commit 2a7685d.
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:123|c|#Group:Dropped" | nc -u -w1 127.0.0.1 8125
andecho "should_not_drop:123|c|#Group:Not_Dropped" | nc -u -w1 127.0.0.1 8125
.As expected, the
should_drop
didn't show up in the CW console in its original form, butshould_not_drop
did. However, they both showed up in their aggregated forms.We also see this in the yaml file:
collectd
The
drop_cpu_value
didn't show up in the CW console in its original form, butshow_cpu_value
did. However, they both showed up in their aggregated forms.ethtool
The
ethtool_queue_0_rx_bytes
didn't show up in the CW console in its original form, butethtool_queue_0_tx_bytes
did. However, they both showed up in their aggregated forms.Additionally, I updated the unit tests to accommodate the changes made in this PR.
Requirements
Before commit the code, please do the following steps.
make fmt
andmake fmt-sh
make lint