@@ -90,7 +90,7 @@ void shouldSendProperRequest() throws Throwable {
90
90
.containsExactly ("my.counter,dt.metrics.source=micrometer count,delta=12 " + clock .wallTime (),
91
91
"my.timer,dt.metrics.source=micrometer gauge,min=12,max=42,sum=108,count=4 " + clock .wallTime (),
92
92
"my.gauge,dt.metrics.source=micrometer gauge," + formatDouble (gauge ) + " " + clock .wallTime (),
93
- "#my.timer gauge dt.meta.unit=milliseconds " );
93
+ "#my.timer gauge dt.meta.unit=ms " );
94
94
})));
95
95
}
96
96
@@ -115,7 +115,7 @@ void shouldResetBetweenRequests() throws Throwable {
115
115
assertThat (request .getEntity ()).asString ()
116
116
.hasLineCount (2 )
117
117
.contains ("my.timer,dt.metrics.source=micrometer gauge,min=22,max=50,sum=72,count=2 " + clock .wallTime (),
118
- "#my.timer gauge dt.meta.unit=milliseconds " );
118
+ "#my.timer gauge dt.meta.unit=ms " );
119
119
120
120
// both are bigger than the previous min and smaller than the previous max. They
121
121
// will only show up if the
@@ -133,7 +133,7 @@ void shouldResetBetweenRequests() throws Throwable {
133
133
assertThat (request2 .getEntity ()).asString ()
134
134
.hasLineCount (2 )
135
135
.contains ("my.timer,dt.metrics.source=micrometer gauge,min=33,max=44,sum=77,count=2 " + clock .wallTime (),
136
- "#my.timer gauge dt.meta.unit=milliseconds " );
136
+ "#my.timer gauge dt.meta.unit=ms " );
137
137
}
138
138
139
139
@ Test
@@ -150,7 +150,7 @@ void shouldNotTrackPercentilesWithDynatraceSummary() throws Throwable {
150
150
verify (httpClient ).send (assertArg ((request -> assertThat (request .getEntity ()).asString ()
151
151
.hasLineCount (2 )
152
152
.contains ("my.timer,dt.metrics.source=micrometer gauge,min=22,max=55,sum=77,count=2 " + clock .wallTime (),
153
- "#my.timer gauge dt.meta.unit=milliseconds " ))));
153
+ "#my.timer gauge dt.meta.unit=ms " ))));
154
154
}
155
155
156
156
@ Test
@@ -204,13 +204,13 @@ void shouldTrackPercentilesWhenDynatraceSummaryInstrumentsNotUsed() throws Throw
204
204
// Timer lines
205
205
"my.timer,dt.metrics.source=micrometer gauge,min=100,max=100,sum=100,count=1 "
206
206
+ clock .wallTime (),
207
- "#my.timer gauge dt.meta.unit=milliseconds " ,
207
+ "#my.timer gauge dt.meta.unit=ms " ,
208
208
// Timer percentile lines. Percentiles are 0 because the step
209
209
// rolled over.
210
210
"my.timer.percentile,dt.metrics.source=micrometer,phi=0.5 gauge,0 " + clock .wallTime (),
211
211
"my.timer.percentile,dt.metrics.source=micrometer,phi=0.7 gauge,0 " + clock .wallTime (),
212
212
"my.timer.percentile,dt.metrics.source=micrometer,phi=0.99 gauge,0 " + clock .wallTime (),
213
- "#my.timer.percentile gauge dt.meta.unit=milliseconds " ,
213
+ "#my.timer.percentile gauge dt.meta.unit=ms " ,
214
214
215
215
// DistributionSummary lines
216
216
"my.ds,dt.metrics.source=micrometer gauge,min=100,max=100,sum=100,count=1 "
@@ -224,15 +224,15 @@ void shouldTrackPercentilesWhenDynatraceSummaryInstrumentsNotUsed() throws Throw
224
224
// LongTaskTimer lines
225
225
"my.ltt,dt.metrics.source=micrometer gauge,min=100,max=100,sum=100,count=1 "
226
226
+ clock .wallTime (),
227
- "#my.ltt gauge dt.meta.unit=milliseconds " ,
227
+ "#my.ltt gauge dt.meta.unit=ms " ,
228
228
// LongTaskTimer percentile lines
229
229
// 0th percentile is missing because it doesn't clear the
230
230
// "interpolatable line" threshold defined in
231
231
// DefaultLongTaskTimer#takeSnapshot().
232
232
"my.ltt.percentile,dt.metrics.source=micrometer,phi=0.5 gauge,100 " + clock .wallTime (),
233
233
"my.ltt.percentile,dt.metrics.source=micrometer,phi=0.7 gauge,100 " + clock .wallTime (),
234
234
"my.ltt.percentile,dt.metrics.source=micrometer,phi=0.99 gauge,100 " + clock .wallTime (),
235
- "#my.ltt.percentile gauge dt.meta.unit=milliseconds " ))));
235
+ "#my.ltt.percentile gauge dt.meta.unit=ms " ))));
236
236
}
237
237
238
238
@ Test
@@ -272,13 +272,13 @@ void shouldTrackPercentilesWhenDynatraceSummaryInstrumentsNotUsed_shouldExport0P
272
272
// Timer lines
273
273
"my.timer,dt.metrics.source=micrometer gauge,min=100,max=100,sum=100,count=1 "
274
274
+ clock .wallTime (),
275
- "#my.timer gauge dt.meta.unit=milliseconds " ,
275
+ "#my.timer gauge dt.meta.unit=ms " ,
276
276
// Timer percentile lines. Percentiles are 0 because the step
277
277
// rolled over.
278
278
"my.timer.percentile,dt.metrics.source=micrometer,phi=0 gauge,0 " + clock .wallTime (),
279
279
"my.timer.percentile,dt.metrics.source=micrometer,phi=0.5 gauge,0 " + clock .wallTime (),
280
280
"my.timer.percentile,dt.metrics.source=micrometer,phi=0.99 gauge,0 " + clock .wallTime (),
281
- "#my.timer.percentile gauge dt.meta.unit=milliseconds " ,
281
+ "#my.timer.percentile gauge dt.meta.unit=ms " ,
282
282
283
283
// DistributionSummary lines
284
284
"my.ds,dt.metrics.source=micrometer gauge,min=100,max=100,sum=100,count=1 " + clock .wallTime (),
@@ -303,7 +303,7 @@ void shouldNotExportLinesWithZeroCount() throws Throwable {
303
303
verify (httpClient ).send (assertArg (request -> assertThat (request .getEntity ()).asString ()
304
304
.hasLineCount (2 )
305
305
.contains ("my.timer,dt.metrics.source=micrometer gauge,min=44,max=44,sum=44,count=1 " + clock .wallTime (),
306
- "#my.timer gauge dt.meta.unit=milliseconds " )));
306
+ "#my.timer gauge dt.meta.unit=ms " )));
307
307
308
308
// reset for next export interval
309
309
reset (httpClient );
@@ -328,7 +328,7 @@ void shouldNotExportLinesWithZeroCount() throws Throwable {
328
328
verify (httpClient ).send (assertArg (request -> assertThat (request .getEntity ()).asString ()
329
329
.hasLineCount (2 )
330
330
.contains ("my.timer,dt.metrics.source=micrometer gauge,min=33,max=33,sum=33,count=1 " + clock .wallTime (),
331
- "#my.timer gauge dt.meta.unit=milliseconds " )));
331
+ "#my.timer gauge dt.meta.unit=ms " )));
332
332
}
333
333
334
334
private DynatraceConfig createDefaultDynatraceConfig () {
0 commit comments