feat(otel): add Karpenter metrics integration test#715
Open
vaishnavi-30-beep wants to merge 14 commits into
Open
feat(otel): add Karpenter metrics integration test#715vaishnavi-30-beep wants to merge 14 commits into
vaishnavi-30-beep wants to merge 14 commits into
Conversation
miconeilaws
reviewed
Jul 2, 2026
0183053 to
db96765
Compare
petruanica
reviewed
Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add automated integration tests for the Karpenter metrics pipeline. Verifies that all 24 Karpenter metrics are scraped by the CloudWatch Agent and forwarded to CloudWatch with correct instrumentation scope, cluster name, namespace, and expected datapoint labels.
Changes
Test code (
test/otel/integrations/karpenter/)setup_test.go— TestMain initialization (region, cluster, SigV4 client, QueryCache)metrics_test.go— 24 Karpenter metric definitions covering pods, nodes, cluster state, nodepools, cloudprovider, and disruption metricskarpenter_test.go— test suites:github.com/aws/karpenterTerraform (
terraform/eks/daemon/otel/)otelContainerInsights.integrations.karpenter.enabled=truein the CW Agent helm valuesShared utility (
util/otelmetrics/source_registry.go)SourceKarpenterto the MetricSource enumTesting
CI integration tests passing for Karpenter under eks_daemon:otel_standard_test: https://github.com/aws/amazon-cloudwatch-agent/actions/runs/28984147604/job/86009444350

Also verified locally against a live EKS cluster (
karpenter-test, eu-north-1) — all tests passing.Related