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

add allowlist to awsentity processor for container insights to fix service names

Open lisguo opened this issue 8 months ago • 1 comments

Description of the issue

We added the awsentity processor to the container insights pipeline including the add_entity flag for the emfexporter.

This causes a problem where the entity processor tries to get the service name and now it overrides the EMF log's Service field which is unintended. This creates the wrong metric dimension and high cardinality metrics.

Bad: "Service": "busybox-service-jn9tc" Good: "Service": "busybox-service"

Description of changes

Add an allow list to the awsentity processor to only allow entity attributes to be appended to the telemetry. For container insights we will only append the platform type:

"com.amazonaws.cloudwatch.entity.internal.platform.type"

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

make test

Requirements

Before commit the code, please do the following steps.

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

lisguo avatar May 13 '25 15:05 lisguo

This PR was marked stale due to lack of activity.

github-actions[bot] avatar May 21 '25 00:05 github-actions[bot]