@@ -117,11 +117,9 @@ test('sends metrics', { timeout: 5_000 }, async (t) => {
117117 assert . equal ( found . length , 1 )
118118 let metric = found [ 0 ]
119119 assert . equal ( metric . name , 'test-counter' )
120- assert . equal ( metric . sum . dataPoints . length , 2 )
120+ assert . equal ( metric . sum . dataPoints . length , 1 )
121121 assert . equal ( metric . sum . dataPoints [ 0 ] . attributes [ 0 ] . key , 'ready' )
122122 assert . deepEqual ( metric . sum . dataPoints [ 0 ] . attributes [ 0 ] . value , { stringValue : 'no' } )
123- assert . equal ( metric . sum . dataPoints [ 1 ] . attributes [ 0 ] . key , 'ready' )
124- assert . deepEqual ( metric . sum . dataPoints [ 1 ] . attributes [ 0 ] . value , { stringValue : 'yes' } )
125123
126124 await once ( server , 'requestComplete' )
127125 payload = requestSchema . decode (
@@ -132,9 +130,11 @@ test('sends metrics', { timeout: 5_000 }, async (t) => {
132130 assert . deepEqual ( resource . attributes [ 0 ] . value , { stringValue : 'guid-123456' } )
133131 metric = payload . resourceMetrics [ 0 ] . scopeMetrics [ 0 ] . metrics [ 0 ]
134132 assert . equal ( metric . name , 'test-counter' )
135- assert . equal ( metric . sum . dataPoints . length , 1 )
136- assert . equal ( metric . sum . dataPoints [ 0 ] . attributes [ 0 ] . key , 'otel ' )
133+ assert . equal ( metric . sum . dataPoints . length , 2 )
134+ assert . equal ( metric . sum . dataPoints [ 0 ] . attributes [ 0 ] . key , 'ready ' )
137135 assert . deepEqual ( metric . sum . dataPoints [ 0 ] . attributes [ 0 ] . value , { stringValue : 'yes' } )
136+ assert . equal ( metric . sum . dataPoints [ 1 ] . attributes [ 0 ] . key , 'otel' )
137+ assert . deepEqual ( metric . sum . dataPoints [ 1 ] . attributes [ 0 ] . value , { stringValue : 'yes' } )
138138
139139 const supportMetrics = agent . metrics . _metrics . unscoped
140140 const expectedMetricNames = [
0 commit comments