@@ -785,26 +785,26 @@ func TestGetCWMetrics(t *testing.T) {
785
785
})
786
786
}
787
787
788
- t .Run ("Unhandled metric type" , func (t * testing.T ) {
788
+ t .Run ("Unhandled metric type" , func (t * testing.T ) {
789
789
metric := pdata .NewMetric ()
790
790
metric .InitEmpty ()
791
791
metric .SetName ("foo" )
792
792
metric .SetUnit ("Count" )
793
793
metric .SetDataType (pdata .MetricDataTypeIntHistogram )
794
794
795
795
obs , logs := observer .New (zap .WarnLevel )
796
- config := & Config {
796
+ obsConfig := & Config {
797
797
DimensionRollupOption : "" ,
798
- logger : zap .New (obs ),
798
+ logger : zap .New (obs ),
799
799
}
800
800
801
- cwMetrics := getCWMetrics (& metric , namespace , instrumentationLibName , config )
801
+ cwMetrics := getCWMetrics (& metric , namespace , instrumentationLibName , obsConfig )
802
802
assert .Nil (t , cwMetrics )
803
803
804
804
// Test output warning logs
805
805
expectedLogs := []observer.LoggedEntry {
806
806
{
807
- Entry : zapcore.Entry {Level : zap .WarnLevel , Message : "Unhandled metric data type." },
807
+ Entry : zapcore.Entry {Level : zap .WarnLevel , Message : "Unhandled metric data type." },
808
808
Context : []zapcore.Field {
809
809
zap .String ("DataType" , "IntHistogram" ),
810
810
zap .String ("Name" , "foo" ),
@@ -816,7 +816,7 @@ func TestGetCWMetrics(t *testing.T) {
816
816
assert .Equal (t , expectedLogs , logs .AllUntimed ())
817
817
})
818
818
819
- t .Run ("Nil metric" , func (t * testing.T ) {
819
+ t .Run ("Nil metric" , func (t * testing.T ) {
820
820
cwMetrics := getCWMetrics (nil , namespace , instrumentationLibName , config )
821
821
assert .Nil (t , cwMetrics )
822
822
})
0 commit comments