Skip to content

Add OTEL LIS CSI MetricsV2 integration tests#693

Merged
nathalapooja merged 1 commit into
mainfrom
otel-lis-csi
May 12, 2026
Merged

Add OTEL LIS CSI MetricsV2 integration tests#693
nathalapooja merged 1 commit into
mainfrom
otel-lis-csi

Conversation

@nathalapooja
Copy link
Copy Markdown
Contributor

@nathalapooja nathalapooja commented May 12, 2026

Summary

Add integration tests for Local Instance Store (LIS) CSI driver metrics validation in the OTEL container insights MetricsV2 pipeline, following the same pattern as the EBS CSI v2 tests.

Metrics Validated (13 total)

Volume-scoped (11):

  • aws_ec2_instance_store_csi_read_bytes_total
  • aws_ec2_instance_store_csi_write_bytes_total
  • aws_ec2_instance_store_csi_read_ops_total
  • aws_ec2_instance_store_csi_write_ops_total
  • aws_ec2_instance_store_csi_read_seconds_total
  • aws_ec2_instance_store_csi_write_seconds_total
  • aws_ec2_instance_store_csi_ec2_exceeded_iops_seconds_total
  • aws_ec2_instance_store_csi_ec2_exceeded_tp_seconds_total
  • aws_ec2_instance_store_csi_volume_queue_length
  • aws_ec2_instance_store_csi_read_io_latency_seconds (histogram)
  • aws_ec2_instance_store_csi_write_io_latency_seconds (histogram)

Collector-internal (2):

  • aws_ec2_instance_store_csi_nvme_collector_errors_total
  • aws_ec2_instance_store_csi_nvme_collector_scrapes_total

Test Assertions

  • Instrumentation scope (instrumentation name = prometheusreceiver)
  • volume_id promoted to resource scope (prefix pvc-) - volume-scoped metrics only
  • instance_id promoted to resource scope (prefix i-) - volume-scoped metrics only
  • No hardware labels (hw.type, hw.vendor, hw.id)

Changes

  • test/otel/lis_csi/ - test suite (follows EBS CSI v2 pattern)
  • terraform/eks/daemon/otel-lis-csi/ - EKS cluster infrastructure with Pod Identity
  • generator/test_case_generator.go - add otel/lis_csi entry
  • util/otelmetrics/source_registry.go - register LIS CSI source

Testing

Successful workflow run: https://github.com/aws/amazon-cloudwatch-agent/actions/runs/25751565145/job/75629043191

Related

@nathalapooja nathalapooja requested a review from a team as a code owner May 12, 2026 18:06
Add integration tests for Local Instance Store CSI driver metrics
validation in the OTEL container insights pipeline. Validates all 13
metrics (9 volume-scoped counters/gauge, 2 latency histograms, 2
collector-internal counters) with proper attribute assertions.

- Add test/otel/lis_csi/ test suite following EBS CSI v2 pattern
- Add terraform/eks/daemon/otel-lis-csi/ infrastructure
- Add otel/lis_csi entry to test case generator
- Split metrics into volume-scoped and collector-internal slices for
  correct volume_id/instance_id assertion scoping
Copy link
Copy Markdown
Contributor

@musa-asad musa-asad left a comment

Choose a reason for hiding this comment

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

Looks good overall! You might need to specify access_config and aws_eks_access_entry similar to PR #674, but I don't think it's a blocker.

@nathalapooja nathalapooja merged commit 9a2c3c7 into main May 12, 2026
6 checks passed
@nathalapooja nathalapooja deleted the otel-lis-csi branch May 12, 2026 19:40
)

// getGroundTruth returns the shared ground truth, initializing it on first call.
func getGroundTruth(t *testing.T) *k8sGroundTruth {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is this doing?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants