Skip to content
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

Remove high-cardinality attribute from AWS Container Insight metrics #37697

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pjanotti
Copy link
Contributor

@pjanotti pjanotti commented Feb 5, 2025

Description

Per code inspection it looks like tags was being used as a convenience feature to pass the timestamp when converting the metrics to OTLP. However, timestamp should not be a resource attribute due to causing high-cardinality time series.

This change keeps the current usage of tags, but, ensures that timestamp is not added as a resource attribute. Code owners should consider if later the timestamp should be passed outside the tags map - a change much larger than the current one.

Link to tracking issue

Fixes #35861

Testing

Updated respective tests.

Documentation

Changelog added.

@@ -166,8 +167,9 @@ func ConvertToOTLPMetrics(fields map[string]any, tags map[string]string, logger
if tagKey == Timestamp {
timeNs, _ := strconv.ParseUint(tagValue, 10, 64)
timestamp = pcommon.Timestamp(timeNs)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

timestamp is added to the data point itself, so it still needs to be calculated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[receiver/awscontainerinsight] High cardinality with default configuration
2 participants