open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
3.12k stars 2.39k forks source link

[receiver/awscontainerinsight] High cardinality with default configuration #35861

Open pjanotti opened 1 month ago

pjanotti commented 1 month ago

Component(s)

receiver/awscontainerinsight

What happened?

Description

Enabling the receiver generates high cardinality metrics since, by default, it adds Timestamp to the published metrics resource.

Steps to Reproduce

Enable the receiver in an AWS ECS EC2 cluster.

Expected Result

No high cardinality metrics from enabling the receiver.

Actual Result

High cardinality metrics.

Collector version

v0.111.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04") Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

The Timestamp may be useful for some post processing by some AWS service, however, per general recommendation on OTel high-cardinality metrics should be avoided on the default configuration, even if a workaround using the resource attribute processor is relatively easy. It seems to me that this attribute should be disabled by default and possibly enabled by some specific configuration.

github-actions[bot] commented 1 month ago

Pinging code owners: