// Code generated by mdatagen. DO NOT EDIT.

package metadata

import (
	"testing"

	"github.com/stretchr/testify/assert"
	"go.opentelemetry.io/collector/pdata/pcommon"
	"go.opentelemetry.io/collector/pdata/pmetric"
	"go.opentelemetry.io/collector/receiver/receivertest"
	"go.uber.org/zap"
	"go.uber.org/zap/zaptest/observer"
)

type testDataSet int

const (
	testDataSetDefault testDataSet = iota
	testDataSetAll
	testDataSetNone
)

func TestMetricsBuilder(t *testing.T) {
	tests := []struct {
		name        string
		metricsSet  testDataSet
		resAttrsSet testDataSet
		expectEmpty bool
	}{
		{
			name: "default",
		},
		{
			name:        "all_set",
			metricsSet:  testDataSetAll,
			resAttrsSet: testDataSetAll,
		},
		{
			name:        "none_set",
			metricsSet:  testDataSetNone,
			resAttrsSet: testDataSetNone,
			expectEmpty: true,
		},
		{
			name:        "filter_set_include",
			resAttrsSet: testDataSetAll,
		},
		{
			name:        "filter_set_exclude",
			resAttrsSet: testDataSetAll,
			expectEmpty: true,
		},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			start := pcommon.Timestamp(1_000_000_000)
			ts := pcommon.Timestamp(1_000_001_000)
			observedZapCore, observedLogs := observer.New(zap.WarnLevel)
			settings := receivertest.NewNopSettings(receivertest.NopType)
			settings.Logger = zap.New(observedZapCore)
			mb := NewMetricsBuilder(loadMetricsBuilderConfig(t, tt.name), settings, WithStartTime(start))

			expectedWarnings := 0

			assert.Equal(t, expectedWarnings, observedLogs.Len())

			defaultMetricsCount := 0
			allMetricsCount := 0

			allMetricsCount++
			mb.RecordDiskioEbsEc2InstancePerformanceExceededIopsDataPoint(ts, 1)

			allMetricsCount++
			mb.RecordDiskioEbsEc2InstancePerformanceExceededTpDataPoint(ts, 1)

			allMetricsCount++
			mb.RecordDiskioEbsTotalReadBytesDataPoint(ts, 1)

			defaultMetricsCount++
			allMetricsCount++
			mb.RecordDiskioEbsTotalReadOpsDataPoint(ts, 1)

			allMetricsCount++
			mb.RecordDiskioEbsTotalReadTimeDataPoint(ts, 1)

			allMetricsCount++
			mb.RecordDiskioEbsTotalWriteBytesDataPoint(ts, 1)

			allMetricsCount++
			mb.RecordDiskioEbsTotalWriteOpsDataPoint(ts, 1)

			allMetricsCount++
			mb.RecordDiskioEbsTotalWriteTimeDataPoint(ts, 1)

			allMetricsCount++
			mb.RecordDiskioEbsVolumePerformanceExceededIopsDataPoint(ts, 1)

			allMetricsCount++
			mb.RecordDiskioEbsVolumePerformanceExceededTpDataPoint(ts, 1)

			allMetricsCount++
			mb.RecordDiskioEbsVolumeQueueLengthDataPoint(ts, 1)

			allMetricsCount++
			mb.RecordDiskioInstanceStorePerformanceExceededIopsDataPoint(ts, 1)

			allMetricsCount++
			mb.RecordDiskioInstanceStorePerformanceExceededTpDataPoint(ts, 1)

			allMetricsCount++
			mb.RecordDiskioInstanceStoreTotalReadBytesDataPoint(ts, 1)

			allMetricsCount++
			mb.RecordDiskioInstanceStoreTotalReadOpsDataPoint(ts, 1)

			allMetricsCount++
			mb.RecordDiskioInstanceStoreTotalReadTimeDataPoint(ts, 1)

			allMetricsCount++
			mb.RecordDiskioInstanceStoreTotalWriteBytesDataPoint(ts, 1)

			allMetricsCount++
			mb.RecordDiskioInstanceStoreTotalWriteOpsDataPoint(ts, 1)

			allMetricsCount++
			mb.RecordDiskioInstanceStoreTotalWriteTimeDataPoint(ts, 1)

			allMetricsCount++
			mb.RecordDiskioInstanceStoreVolumeQueueLengthDataPoint(ts, 1)

			rb := mb.NewResourceBuilder()
			rb.SetSerialID("SerialId-val")
			rb.SetVolumeID("VolumeId-val")
			res := rb.Emit()
			metrics := mb.Emit(WithResource(res))

			if tt.expectEmpty {
				assert.Equal(t, 0, metrics.ResourceMetrics().Len())
				return
			}

			assert.Equal(t, 1, metrics.ResourceMetrics().Len())
			rm := metrics.ResourceMetrics().At(0)
			assert.Equal(t, res, rm.Resource())
			assert.Equal(t, 1, rm.ScopeMetrics().Len())
			ms := rm.ScopeMetrics().At(0).Metrics()
			if tt.metricsSet == testDataSetDefault {
				assert.Equal(t, defaultMetricsCount, ms.Len())
			}
			if tt.metricsSet == testDataSetAll {
				assert.Equal(t, allMetricsCount, ms.Len())
			}
			validatedMetrics := make(map[string]bool)
			for i := 0; i < ms.Len(); i++ {
				switch ms.At(i).Name() {
				case "diskio_ebs_ec2_instance_performance_exceeded_iops":
					assert.False(t, validatedMetrics["diskio_ebs_ec2_instance_performance_exceeded_iops"], "Found a duplicate in the metrics slice: diskio_ebs_ec2_instance_performance_exceeded_iops")
					validatedMetrics["diskio_ebs_ec2_instance_performance_exceeded_iops"] = true
					assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type())
					assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len())
					assert.Equal(t, "The total time, in nanoseconds, that the EBS volume exceeded the attached Amazon EC2 instance's maximum IOPS performance", ms.At(i).Description())
					assert.Equal(t, "ns", ms.At(i).Unit())
					assert.True(t, ms.At(i).Sum().IsMonotonic())
					assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality())
					dp := ms.At(i).Sum().DataPoints().At(0)
					assert.Equal(t, start, dp.StartTimestamp())
					assert.Equal(t, ts, dp.Timestamp())
					assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType())
					assert.Equal(t, int64(1), dp.IntValue())
				case "diskio_ebs_ec2_instance_performance_exceeded_tp":
					assert.False(t, validatedMetrics["diskio_ebs_ec2_instance_performance_exceeded_tp"], "Found a duplicate in the metrics slice: diskio_ebs_ec2_instance_performance_exceeded_tp")
					validatedMetrics["diskio_ebs_ec2_instance_performance_exceeded_tp"] = true
					assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type())
					assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len())
					assert.Equal(t, "The total time, in nanoseconds, that the EBS volume exceeded the attached Amazon EC2 instance's maximum throughput performance", ms.At(i).Description())
					assert.Equal(t, "ns", ms.At(i).Unit())
					assert.True(t, ms.At(i).Sum().IsMonotonic())
					assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality())
					dp := ms.At(i).Sum().DataPoints().At(0)
					assert.Equal(t, start, dp.StartTimestamp())
					assert.Equal(t, ts, dp.Timestamp())
					assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType())
					assert.Equal(t, int64(1), dp.IntValue())
				case "diskio_ebs_total_read_bytes":
					assert.False(t, validatedMetrics["diskio_ebs_total_read_bytes"], "Found a duplicate in the metrics slice: diskio_ebs_total_read_bytes")
					validatedMetrics["diskio_ebs_total_read_bytes"] = true
					assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type())
					assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len())
					assert.Equal(t, "The total number of read bytes transferred", ms.At(i).Description())
					assert.Equal(t, "By", ms.At(i).Unit())
					assert.True(t, ms.At(i).Sum().IsMonotonic())
					assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality())
					dp := ms.At(i).Sum().DataPoints().At(0)
					assert.Equal(t, start, dp.StartTimestamp())
					assert.Equal(t, ts, dp.Timestamp())
					assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType())
					assert.Equal(t, int64(1), dp.IntValue())
				case "diskio_ebs_total_read_ops":
					assert.False(t, validatedMetrics["diskio_ebs_total_read_ops"], "Found a duplicate in the metrics slice: diskio_ebs_total_read_ops")
					validatedMetrics["diskio_ebs_total_read_ops"] = true
					assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type())
					assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len())
					assert.Equal(t, "The total number of completed read operations", ms.At(i).Description())
					assert.Equal(t, "1", ms.At(i).Unit())
					assert.True(t, ms.At(i).Sum().IsMonotonic())
					assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality())
					dp := ms.At(i).Sum().DataPoints().At(0)
					assert.Equal(t, start, dp.StartTimestamp())
					assert.Equal(t, ts, dp.Timestamp())
					assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType())
					assert.Equal(t, int64(1), dp.IntValue())
				case "diskio_ebs_total_read_time":
					assert.False(t, validatedMetrics["diskio_ebs_total_read_time"], "Found a duplicate in the metrics slice: diskio_ebs_total_read_time")
					validatedMetrics["diskio_ebs_total_read_time"] = true
					assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type())
					assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len())
					assert.Equal(t, "The total time spent, in nanoseconds, by all completed read operations", ms.At(i).Description())
					assert.Equal(t, "ns", ms.At(i).Unit())
					assert.True(t, ms.At(i).Sum().IsMonotonic())
					assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality())
					dp := ms.At(i).Sum().DataPoints().At(0)
					assert.Equal(t, start, dp.StartTimestamp())
					assert.Equal(t, ts, dp.Timestamp())
					assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType())
					assert.Equal(t, int64(1), dp.IntValue())
				case "diskio_ebs_total_write_bytes":
					assert.False(t, validatedMetrics["diskio_ebs_total_write_bytes"], "Found a duplicate in the metrics slice: diskio_ebs_total_write_bytes")
					validatedMetrics["diskio_ebs_total_write_bytes"] = true
					assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type())
					assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len())
					assert.Equal(t, "The total number of write bytes transferred", ms.At(i).Description())
					assert.Equal(t, "By", ms.At(i).Unit())
					assert.True(t, ms.At(i).Sum().IsMonotonic())
					assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality())
					dp := ms.At(i).Sum().DataPoints().At(0)
					assert.Equal(t, start, dp.StartTimestamp())
					assert.Equal(t, ts, dp.Timestamp())
					assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType())
					assert.Equal(t, int64(1), dp.IntValue())
				case "diskio_ebs_total_write_ops":
					assert.False(t, validatedMetrics["diskio_ebs_total_write_ops"], "Found a duplicate in the metrics slice: diskio_ebs_total_write_ops")
					validatedMetrics["diskio_ebs_total_write_ops"] = true
					assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type())
					assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len())
					assert.Equal(t, "The total number of completed write operations", ms.At(i).Description())
					assert.Equal(t, "1", ms.At(i).Unit())
					assert.True(t, ms.At(i).Sum().IsMonotonic())
					assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality())
					dp := ms.At(i).Sum().DataPoints().At(0)
					assert.Equal(t, start, dp.StartTimestamp())
					assert.Equal(t, ts, dp.Timestamp())
					assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType())
					assert.Equal(t, int64(1), dp.IntValue())
				case "diskio_ebs_total_write_time":
					assert.False(t, validatedMetrics["diskio_ebs_total_write_time"], "Found a duplicate in the metrics slice: diskio_ebs_total_write_time")
					validatedMetrics["diskio_ebs_total_write_time"] = true
					assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type())
					assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len())
					assert.Equal(t, "The total time spent, in nanoseconds, by all completed write operations", ms.At(i).Description())
					assert.Equal(t, "ns", ms.At(i).Unit())
					assert.True(t, ms.At(i).Sum().IsMonotonic())
					assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality())
					dp := ms.At(i).Sum().DataPoints().At(0)
					assert.Equal(t, start, dp.StartTimestamp())
					assert.Equal(t, ts, dp.Timestamp())
					assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType())
					assert.Equal(t, int64(1), dp.IntValue())
				case "diskio_ebs_volume_performance_exceeded_iops":
					assert.False(t, validatedMetrics["diskio_ebs_volume_performance_exceeded_iops"], "Found a duplicate in the metrics slice: diskio_ebs_volume_performance_exceeded_iops")
					validatedMetrics["diskio_ebs_volume_performance_exceeded_iops"] = true
					assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type())
					assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len())
					assert.Equal(t, "The total time, in nanoseconds, that IOPS demand exceeded the volume's provisioned IOPS performance", ms.At(i).Description())
					assert.Equal(t, "ns", ms.At(i).Unit())
					assert.True(t, ms.At(i).Sum().IsMonotonic())
					assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality())
					dp := ms.At(i).Sum().DataPoints().At(0)
					assert.Equal(t, start, dp.StartTimestamp())
					assert.Equal(t, ts, dp.Timestamp())
					assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType())
					assert.Equal(t, int64(1), dp.IntValue())
				case "diskio_ebs_volume_performance_exceeded_tp":
					assert.False(t, validatedMetrics["diskio_ebs_volume_performance_exceeded_tp"], "Found a duplicate in the metrics slice: diskio_ebs_volume_performance_exceeded_tp")
					validatedMetrics["diskio_ebs_volume_performance_exceeded_tp"] = true
					assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type())
					assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len())
					assert.Equal(t, "The total time, in nanoseconds, that throughput demand exceeded the volume's provisioned throughput performance", ms.At(i).Description())
					assert.Equal(t, "ns", ms.At(i).Unit())
					assert.True(t, ms.At(i).Sum().IsMonotonic())
					assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality())
					dp := ms.At(i).Sum().DataPoints().At(0)
					assert.Equal(t, start, dp.StartTimestamp())
					assert.Equal(t, ts, dp.Timestamp())
					assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType())
					assert.Equal(t, int64(1), dp.IntValue())
				case "diskio_ebs_volume_queue_length":
					assert.False(t, validatedMetrics["diskio_ebs_volume_queue_length"], "Found a duplicate in the metrics slice: diskio_ebs_volume_queue_length")
					validatedMetrics["diskio_ebs_volume_queue_length"] = true
					assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type())
					assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len())
					assert.Equal(t, "The number of read and write operations waiting to be completed", ms.At(i).Description())
					assert.Equal(t, "1", ms.At(i).Unit())
					dp := ms.At(i).Gauge().DataPoints().At(0)
					assert.Equal(t, start, dp.StartTimestamp())
					assert.Equal(t, ts, dp.Timestamp())
					assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType())
					assert.Equal(t, int64(1), dp.IntValue())
				case "diskio_instance_store_performance_exceeded_iops":
					assert.False(t, validatedMetrics["diskio_instance_store_performance_exceeded_iops"], "Found a duplicate in the metrics slice: diskio_instance_store_performance_exceeded_iops")
					validatedMetrics["diskio_instance_store_performance_exceeded_iops"] = true
					assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type())
					assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len())
					assert.Equal(t, "The total time, in nanoseconds, that the Instance Store volume exceeded the attached Amazon EC2 instance's maximum IOPS performance", ms.At(i).Description())
					assert.Equal(t, "ns", ms.At(i).Unit())
					assert.True(t, ms.At(i).Sum().IsMonotonic())
					assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality())
					dp := ms.At(i).Sum().DataPoints().At(0)
					assert.Equal(t, start, dp.StartTimestamp())
					assert.Equal(t, ts, dp.Timestamp())
					assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType())
					assert.Equal(t, int64(1), dp.IntValue())
				case "diskio_instance_store_performance_exceeded_tp":
					assert.False(t, validatedMetrics["diskio_instance_store_performance_exceeded_tp"], "Found a duplicate in the metrics slice: diskio_instance_store_performance_exceeded_tp")
					validatedMetrics["diskio_instance_store_performance_exceeded_tp"] = true
					assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type())
					assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len())
					assert.Equal(t, "The total time, in nanoseconds, that the Instance Store volume exceeded the attached Amazon EC2 instance's maximum throughput performance", ms.At(i).Description())
					assert.Equal(t, "ns", ms.At(i).Unit())
					assert.True(t, ms.At(i).Sum().IsMonotonic())
					assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality())
					dp := ms.At(i).Sum().DataPoints().At(0)
					assert.Equal(t, start, dp.StartTimestamp())
					assert.Equal(t, ts, dp.Timestamp())
					assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType())
					assert.Equal(t, int64(1), dp.IntValue())
				case "diskio_instance_store_total_read_bytes":
					assert.False(t, validatedMetrics["diskio_instance_store_total_read_bytes"], "Found a duplicate in the metrics slice: diskio_instance_store_total_read_bytes")
					validatedMetrics["diskio_instance_store_total_read_bytes"] = true
					assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type())
					assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len())
					assert.Equal(t, "The total number of read bytes transferred for Instance Store devices", ms.At(i).Description())
					assert.Equal(t, "By", ms.At(i).Unit())
					assert.True(t, ms.At(i).Sum().IsMonotonic())
					assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality())
					dp := ms.At(i).Sum().DataPoints().At(0)
					assert.Equal(t, start, dp.StartTimestamp())
					assert.Equal(t, ts, dp.Timestamp())
					assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType())
					assert.Equal(t, int64(1), dp.IntValue())
				case "diskio_instance_store_total_read_ops":
					assert.False(t, validatedMetrics["diskio_instance_store_total_read_ops"], "Found a duplicate in the metrics slice: diskio_instance_store_total_read_ops")
					validatedMetrics["diskio_instance_store_total_read_ops"] = true
					assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type())
					assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len())
					assert.Equal(t, "The total number of completed read operations for Instance Store devices", ms.At(i).Description())
					assert.Equal(t, "1", ms.At(i).Unit())
					assert.True(t, ms.At(i).Sum().IsMonotonic())
					assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality())
					dp := ms.At(i).Sum().DataPoints().At(0)
					assert.Equal(t, start, dp.StartTimestamp())
					assert.Equal(t, ts, dp.Timestamp())
					assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType())
					assert.Equal(t, int64(1), dp.IntValue())
				case "diskio_instance_store_total_read_time":
					assert.False(t, validatedMetrics["diskio_instance_store_total_read_time"], "Found a duplicate in the metrics slice: diskio_instance_store_total_read_time")
					validatedMetrics["diskio_instance_store_total_read_time"] = true
					assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type())
					assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len())
					assert.Equal(t, "The total time spent, in nanoseconds, by all completed read operations for Instance Store devices", ms.At(i).Description())
					assert.Equal(t, "ns", ms.At(i).Unit())
					assert.True(t, ms.At(i).Sum().IsMonotonic())
					assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality())
					dp := ms.At(i).Sum().DataPoints().At(0)
					assert.Equal(t, start, dp.StartTimestamp())
					assert.Equal(t, ts, dp.Timestamp())
					assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType())
					assert.Equal(t, int64(1), dp.IntValue())
				case "diskio_instance_store_total_write_bytes":
					assert.False(t, validatedMetrics["diskio_instance_store_total_write_bytes"], "Found a duplicate in the metrics slice: diskio_instance_store_total_write_bytes")
					validatedMetrics["diskio_instance_store_total_write_bytes"] = true
					assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type())
					assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len())
					assert.Equal(t, "The total number of write bytes transferred for Instance Store devices", ms.At(i).Description())
					assert.Equal(t, "By", ms.At(i).Unit())
					assert.True(t, ms.At(i).Sum().IsMonotonic())
					assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality())
					dp := ms.At(i).Sum().DataPoints().At(0)
					assert.Equal(t, start, dp.StartTimestamp())
					assert.Equal(t, ts, dp.Timestamp())
					assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType())
					assert.Equal(t, int64(1), dp.IntValue())
				case "diskio_instance_store_total_write_ops":
					assert.False(t, validatedMetrics["diskio_instance_store_total_write_ops"], "Found a duplicate in the metrics slice: diskio_instance_store_total_write_ops")
					validatedMetrics["diskio_instance_store_total_write_ops"] = true
					assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type())
					assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len())
					assert.Equal(t, "The total number of completed write operations for Instance Store devices", ms.At(i).Description())
					assert.Equal(t, "1", ms.At(i).Unit())
					assert.True(t, ms.At(i).Sum().IsMonotonic())
					assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality())
					dp := ms.At(i).Sum().DataPoints().At(0)
					assert.Equal(t, start, dp.StartTimestamp())
					assert.Equal(t, ts, dp.Timestamp())
					assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType())
					assert.Equal(t, int64(1), dp.IntValue())
				case "diskio_instance_store_total_write_time":
					assert.False(t, validatedMetrics["diskio_instance_store_total_write_time"], "Found a duplicate in the metrics slice: diskio_instance_store_total_write_time")
					validatedMetrics["diskio_instance_store_total_write_time"] = true
					assert.Equal(t, pmetric.MetricTypeSum, ms.At(i).Type())
					assert.Equal(t, 1, ms.At(i).Sum().DataPoints().Len())
					assert.Equal(t, "The total time spent, in nanoseconds, by all completed write operations for Instance Store devices", ms.At(i).Description())
					assert.Equal(t, "ns", ms.At(i).Unit())
					assert.True(t, ms.At(i).Sum().IsMonotonic())
					assert.Equal(t, pmetric.AggregationTemporalityCumulative, ms.At(i).Sum().AggregationTemporality())
					dp := ms.At(i).Sum().DataPoints().At(0)
					assert.Equal(t, start, dp.StartTimestamp())
					assert.Equal(t, ts, dp.Timestamp())
					assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType())
					assert.Equal(t, int64(1), dp.IntValue())
				case "diskio_instance_store_volume_queue_length":
					assert.False(t, validatedMetrics["diskio_instance_store_volume_queue_length"], "Found a duplicate in the metrics slice: diskio_instance_store_volume_queue_length")
					validatedMetrics["diskio_instance_store_volume_queue_length"] = true
					assert.Equal(t, pmetric.MetricTypeGauge, ms.At(i).Type())
					assert.Equal(t, 1, ms.At(i).Gauge().DataPoints().Len())
					assert.Equal(t, "The number of read and write operations waiting to be completed for Instance Store devices", ms.At(i).Description())
					assert.Equal(t, "1", ms.At(i).Unit())
					dp := ms.At(i).Gauge().DataPoints().At(0)
					assert.Equal(t, start, dp.StartTimestamp())
					assert.Equal(t, ts, dp.Timestamp())
					assert.Equal(t, pmetric.NumberDataPointValueTypeInt, dp.ValueType())
					assert.Equal(t, int64(1), dp.IntValue())
				}
			}
		})
	}
}
