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