@@ -328,7 +328,7 @@ func BenchmarkConditionSequenceEvalMetrics(b *testing.B) {
328328
329329func buildMetricStatements (count int ) []string {
330330 result := make ([]string , 0 , count )
331- for i := 0 ; i < count ; i ++ {
331+ for i := range count {
332332 switch i % 5 {
333333 case 0 :
334334 result = append (result , fmt .Sprintf (`set(metric.metadata["copy_source_%[1]d"], metric.metadata["source_%[1]d"])` , i ))
@@ -347,7 +347,7 @@ func buildMetricStatements(count int) []string {
347347
348348func buildMetricConditions (count int ) []string {
349349 result := make ([]string , 0 , count )
350- for i := 0 ; i < count ; i ++ {
350+ for i := range count {
351351 switch i % 5 {
352352 case 0 :
353353 result = append (result , "metric.type == METRIC_DATA_TYPE_SUM" )
@@ -400,7 +400,7 @@ func newBenchmarkMetricContext(attributeCount int) ottlmetric.TransformContext {
400400 dp .Attributes ().PutStr ("method" , "GET" )
401401 dp .SetIntValue (4200 )
402402
403- for i := 0 ; i < attributeCount ; i ++ {
403+ for i := range attributeCount {
404404 metric .Metadata ().PutStr (fmt .Sprintf ("source_%d" , i ), fmt .Sprintf ("value_%d" , i ))
405405 dp .Attributes ().PutStr (fmt .Sprintf ("label_%d" , i ), fmt .Sprintf ("value_%d" , i ))
406406 }
@@ -410,7 +410,7 @@ func newBenchmarkMetricContext(attributeCount int) ottlmetric.TransformContext {
410410
411411func buildLogStatements (count int ) []string {
412412 result := make ([]string , 0 , count )
413- for i := 0 ; i < count ; i ++ {
413+ for i := range count {
414414 switch i % 5 {
415415 case 0 :
416416 result = append (result , fmt .Sprintf (`set(log.attributes["conditional_copy_%[1]d"], log.attributes["source_%[1]d"]) where log.attributes["severity_text"] == "error"` , i ))
@@ -429,7 +429,7 @@ func buildLogStatements(count int) []string {
429429
430430func buildSpanStatements (count int ) []string {
431431 result := make ([]string , 0 , count )
432- for i := 0 ; i < count ; i ++ {
432+ for i := range count {
433433 switch i % 4 {
434434 case 0 :
435435 result = append (result , fmt .Sprintf (`set(span.attributes["span_copy_%[1]d"], span.attributes["source_%[1]d"]) where span.kind.string == "SPAN_KIND_CLIENT"` , i ))
@@ -446,7 +446,7 @@ func buildSpanStatements(count int) []string {
446446
447447func buildLogConditions (count int ) []string {
448448 result := make ([]string , 0 , count )
449- for i := 0 ; i < count ; i ++ {
449+ for i := range count {
450450 switch i % 3 {
451451 case 0 :
452452 result = append (result , fmt .Sprintf (`log.attributes["source_%[1]d"] != nil` , i ))
@@ -481,7 +481,7 @@ func newBenchmarkLogContext(attributeCount int) ottllog.TransformContext {
481481 tags .AppendEmpty ().SetStr ("prod" )
482482 tags .AppendEmpty ().SetStr ("critical" )
483483
484- for i := 0 ; i < attributeCount ; i ++ {
484+ for i := range attributeCount {
485485 logRecord .Attributes ().PutStr (fmt .Sprintf ("source_%d" , i ), fmt .Sprintf ("value_%d" , i ))
486486 }
487487
@@ -513,7 +513,7 @@ func newBenchmarkSpanContext(attributeCount int) ottlspan.TransformContext {
513513 span .Status ().SetCode (ptrace .StatusCodeOk )
514514 span .Status ().SetMessage ("ok" )
515515
516- for i := 0 ; i < attributeCount ; i ++ {
516+ for i := range attributeCount {
517517 span .Attributes ().PutStr (fmt .Sprintf ("source_%d" , i ), fmt .Sprintf ("span_value_%d" , i ))
518518 }
519519
@@ -619,7 +619,7 @@ func newSliceContextWithPrimitiveArr(arrSize int) ottllog.TransformContext {
619619
620620 arr := lr .Attributes ().PutEmptySlice ("arr" )
621621 arr .EnsureCapacity (arrSize )
622- for i := 0 ; i < arrSize ; i ++ {
622+ for i := range arrSize {
623623 arr .AppendEmpty ().SetStr ("v_" + strconv .Itoa (i ))
624624 }
625625
@@ -637,7 +637,7 @@ func newSliceContextWithMapArr(arrSize int) ottllog.TransformContext {
637637
638638 arr := lr .Attributes ().PutEmptySlice ("arr" )
639639 arr .EnsureCapacity (arrSize )
640- for i := 0 ; i < arrSize ; i ++ {
640+ for i := range arrSize {
641641 elem := arr .AppendEmpty ()
642642 m := elem .SetEmptyMap ()
643643 m .PutStr ("id" , "item_" + strconv .Itoa (i ))
0 commit comments