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

Clean up legacy ContainerInsights

Open movence opened this issue 5 months ago • 1 comments

Description of the issue

There are dead codes that used to support legacy ContainerInsights.

  • plugins/processors/k8sdecorator (internal/k8sCommon/kubeletutil): related PR https://github.com/aws/amazon-cloudwatch-agent/pull/862
  • plugins/processors/ecsdecorator: related commit https://github.com/aws/amazon-cloudwatch-agent/commit/858a75e03f9568ad9650c312b063df56df81db05

These functionalities are now supported by the ContainerInsights packages from the contrib

Description of changes

  • Deprecate unused processor packages (k8sdecorator and ecsdecorator)
  • Deprecate related functions and packages (stores under k8sclient, kubeletutil and others)
  • Deprecate internal/containerinsightscommon
    • move consts into internal/constants/containerinsights.go
    • move a function only used by metrictransformerprocessor to prefix metric names by resource type (eg. gpu_utilization -> node_gpu_utilization)

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

Validated ContainerInsights and ApplicationSignals working as expected after this clean up

Requirements

Before commiting your code, please do the following steps.

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

Integration Tests

To run integration tests against this PR, add the ready for testing label.

movence avatar Jul 11 '25 18:07 movence