@@ -55,7 +55,7 @@ void timeMethod() {
55
55
service .call ();
56
56
57
57
assertThat (registry .get ("call" )
58
- .tag ("class" , getClass (). getName () + "$TimedService" )
58
+ .tag ("class" , TimedService . class . getName ())
59
59
.tag ("method" , "call" )
60
60
.tag ("extra" , "tag" )
61
61
.timer ()
@@ -88,7 +88,7 @@ void timeMethodWithLongTaskTimer() {
88
88
service .longCall ();
89
89
90
90
assertThat (registry .get ("longCall" )
91
- .tag ("class" , getClass (). getName () + "$TimedService" )
91
+ .tag ("class" , TimedService . class . getName ())
92
92
.tag ("method" , "longCall" )
93
93
.tag ("extra" , "tag" )
94
94
.longTaskTimers ()).hasSize (1 );
@@ -136,7 +136,7 @@ void timeMethodWithError() {
136
136
assertThatThrownBy (service ::callRaisingError ).isInstanceOf (TestError .class );
137
137
138
138
assertThat (registry .get ("callRaisingError" )
139
- .tag ("class" , getClass (). getName () + "$TimedService" )
139
+ .tag ("class" , TimedService . class . getName ())
140
140
.tag ("method" , "callRaisingError" )
141
141
.tag ("extra" , "tag" )
142
142
.tag ("exception" , "TestError" )
@@ -158,7 +158,7 @@ void timeMethodWithErrorAndLongTaskTimer() {
158
158
assertThatThrownBy (service ::longCallRaisingError ).isInstanceOf (TestError .class );
159
159
160
160
assertThat (registry .get ("longCallRaisingError" )
161
- .tag ("class" , getClass (). getName () + "$TimedService" )
161
+ .tag ("class" , TimedService . class . getName ())
162
162
.tag ("method" , "longCallRaisingError" )
163
163
.tag ("extra" , "tag" )
164
164
.longTaskTimer ()
@@ -183,7 +183,7 @@ void timeMethodWhenCompleted() {
183
183
completableFuture .join ();
184
184
185
185
assertThat (registry .get ("call" )
186
- .tag ("class" , getClass (). getName () + "$AsyncTimedService" )
186
+ .tag ("class" , AsyncTimedService . class . getName ())
187
187
.tag ("method" , "call" )
188
188
.tag ("extra" , "tag" )
189
189
.tag ("exception" , "none" )
@@ -209,7 +209,7 @@ void timeMethodWhenCompletedExceptionally() {
209
209
assertThatThrownBy (completableFuture ::join ).isInstanceOf (CompletionException .class );
210
210
211
211
assertThat (registry .get ("call" )
212
- .tag ("class" , getClass (). getName () + "$AsyncTimedService" )
212
+ .tag ("class" , AsyncTimedService . class . getName ())
213
213
.tag ("method" , "call" )
214
214
.tag ("extra" , "tag" )
215
215
.tag ("exception" , "IllegalStateException" )
@@ -232,7 +232,7 @@ void timeMethodWhenReturnCompletionStageNull() {
232
232
assertThat (registry .getMeters ()).isNotEmpty ();
233
233
234
234
assertThat (registry .get ("callNull" )
235
- .tag ("class" , getClass (). getName () + "$AsyncTimedService" )
235
+ .tag ("class" , AsyncTimedService . class . getName ())
236
236
.tag ("method" , "callNull" )
237
237
.tag ("extra" , "tag" )
238
238
.tag ("exception" , "none" )
@@ -253,7 +253,7 @@ void timeMethodWithLongTaskTimerWhenCompleted() {
253
253
CompletableFuture <?> completableFuture = service .longCall (guardedResult );
254
254
255
255
assertThat (registry .find ("longCall" )
256
- .tag ("class" , getClass (). getName () + "$AsyncTimedService" )
256
+ .tag ("class" , AsyncTimedService . class . getName ())
257
257
.tag ("method" , "longCall" )
258
258
.tag ("extra" , "tag" )
259
259
.longTaskTimer ()
@@ -263,7 +263,7 @@ void timeMethodWithLongTaskTimerWhenCompleted() {
263
263
completableFuture .join ();
264
264
265
265
assertThat (registry .get ("longCall" )
266
- .tag ("class" , getClass (). getName () + "$AsyncTimedService" )
266
+ .tag ("class" , AsyncTimedService . class . getName ())
267
267
.tag ("method" , "longCall" )
268
268
.tag ("extra" , "tag" )
269
269
.longTaskTimer ()
@@ -283,7 +283,7 @@ void timeMethodWithLongTaskTimerWhenCompletedExceptionally() {
283
283
CompletableFuture <?> completableFuture = service .longCall (guardedResult );
284
284
285
285
assertThat (registry .find ("longCall" )
286
- .tag ("class" , getClass (). getName () + "$AsyncTimedService" )
286
+ .tag ("class" , AsyncTimedService . class . getName ())
287
287
.tag ("method" , "longCall" )
288
288
.tag ("extra" , "tag" )
289
289
.longTaskTimer ()
@@ -293,7 +293,7 @@ void timeMethodWithLongTaskTimerWhenCompletedExceptionally() {
293
293
assertThatThrownBy (completableFuture ::join ).isInstanceOf (CompletionException .class );
294
294
295
295
assertThat (registry .get ("longCall" )
296
- .tag ("class" , getClass (). getName () + "$AsyncTimedService" )
296
+ .tag ("class" , AsyncTimedService . class . getName ())
297
297
.tag ("method" , "longCall" )
298
298
.tag ("extra" , "tag" )
299
299
.longTaskTimer ()
@@ -313,13 +313,13 @@ void timeMethodWithLongTaskTimerWhenReturnCompletionStageNull() {
313
313
assertThat (completableFuture ).isNull ();
314
314
315
315
assertThat (registry .get ("longCallNull" )
316
- .tag ("class" , getClass (). getName () + "$AsyncTimedService" )
316
+ .tag ("class" , AsyncTimedService . class . getName ())
317
317
.tag ("method" , "longCallNull" )
318
318
.tag ("extra" , "tag" )
319
319
.longTaskTimers ()).hasSize (1 );
320
320
321
321
assertThat (registry .find ("longCallNull" )
322
- .tag ("class" , getClass (). getName () + "$AsyncTimedService" )
322
+ .tag ("class" , AsyncTimedService . class . getName ())
323
323
.tag ("method" , "longCallNull" )
324
324
.tag ("extra" , "tag" )
325
325
.longTaskTimer ()
0 commit comments