aws / aws/amazon-cloudwatch-agent
Disable collecting metrics/logs with annotation based on the cloudwatch agent.
- Dominant language
- Go
- Stars
- 550
- Forks
- 271
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 13
Description
**Is your feature request related to a problem? Please describe.**
If a pod has the annotation aws.amazon.com/cloudwatch-agent-ignore: true it should be ignored by the amazon-cloudwatch-agent and logs/metrics should not be pushed to cloudwatch for that pod.
[1] https://github.com/aws/amazon-cloudwatch-agent/blob/dd1be96164c2cd6226a33c8cf7ce10a7f29547cf/plugins/processors/k8sdecorator/stores/podstore.go#L31
[2] https://github.com/aws/amazon-cloudwatch-agent/blob/dd1be96164c2cd6226a33c8cf7ce10a7f29547cf/plugins/processors/k8sdecorator/stores/podstore.go#L144-L146
Contributor guide
Research direction
Start with plugins/processors/k8sdecorator/stores/podstore.go, especially the referenced code around lines 31 and 144-146, to understand how pod annotations are stored and checked. Done means a pod annotated with aws.amazon.com/cloudwatch-agent-ignore: true is excluded from CloudWatch metrics and log collection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, go, kubernetes
- Domain
- cloud, observability
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100