Skip to content

Commit

Permalink
Merge branch '1.12.x' into 1.13.x
Browse files Browse the repository at this point in the history
  • Loading branch information
shakuzen committed Jan 10, 2025
2 parents 819fa61 + 5010e2d commit d1c8045
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void countedWithSuccessfulMetrics() {

Counter counter = meterRegistry.get("metric.success")
.tag("method", "succeedWithMetrics")
.tag("class", getClass().getName() + "$CountedService")
.tag("class", CountedService.class.getName())
.tag("extra", "tag")
.tag("result", "success")
.counter();
Expand Down Expand Up @@ -91,7 +91,7 @@ void countedWithFailure() {

Counter counter = meterRegistry.get("metric.failing")
.tag("method", "fail")
.tag("class", getClass().getName() + "$CountedService")
.tag("class", CountedService.class.getName())
.tag("exception", "RuntimeException")
.tag("result", "failure")
.counter();
Expand Down Expand Up @@ -131,7 +131,7 @@ void countedWithSuccessfulMetricsWhenCompleted() {

assertThat(meterRegistry.find("metric.success")
.tag("method", "succeedWithMetrics")
.tag("class", getClass().getName() + "$AsyncCountedService")
.tag("class", AsyncCountedService.class.getName())
.tag("extra", "tag")
.tag("exception", "none")
.tag("result", "success")
Expand All @@ -142,7 +142,7 @@ void countedWithSuccessfulMetricsWhenCompleted() {

Counter counterAfterCompletion = meterRegistry.get("metric.success")
.tag("method", "succeedWithMetrics")
.tag("class", getClass().getName() + "$AsyncCountedService")
.tag("class", AsyncCountedService.class.getName())
.tag("extra", "tag")
.tag("exception", "none")
.tag("result", "success")
Expand All @@ -159,7 +159,7 @@ void countedWithFailureWhenCompleted() {

assertThat(meterRegistry.find("metric.failing")
.tag("method", "fail")
.tag("class", getClass().getName() + "$AsyncCountedService")
.tag("class", AsyncCountedService.class.getName())
.tag("exception", "RuntimeException")
.tag("result", "failure")
.counter()).isNull();
Expand All @@ -169,7 +169,7 @@ void countedWithFailureWhenCompleted() {

Counter counter = meterRegistry.get("metric.failing")
.tag("method", "fail")
.tag("class", getClass().getName() + "$AsyncCountedService")
.tag("class", AsyncCountedService.class.getName())
.tag("exception", "RuntimeException")
.tag("result", "failure")
.counter();
Expand Down Expand Up @@ -220,7 +220,7 @@ void countedWithSuccessfulMetricsWhenReturnsCompletionStageNull() {

assertThat(meterRegistry.get("metric.success")
.tag("method", "successButNull")
.tag("class", getClass().getName() + "$AsyncCountedService")
.tag("class", AsyncCountedService.class.getName())
.tag("extra", "tag")
.tag("exception", "none")
.tag("result", "success")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void timeMethod() {
service.call();

assertThat(registry.get("call")
.tag("class", getClass().getName() + "$TimedService")
.tag("class", TimedService.class.getName())
.tag("method", "call")
.tag("extra", "tag")
.timer()
Expand Down Expand Up @@ -89,7 +89,7 @@ void timeMethodWithLongTaskTimer() {
service.longCall();

assertThat(registry.get("longCall")
.tag("class", getClass().getName() + "$TimedService")
.tag("class", TimedService.class.getName())
.tag("method", "longCall")
.tag("extra", "tag")
.longTaskTimers()).hasSize(1);
Expand Down Expand Up @@ -137,7 +137,7 @@ void timeMethodWithError() {
assertThatThrownBy(service::callRaisingError).isInstanceOf(TestError.class);

assertThat(registry.get("callRaisingError")
.tag("class", getClass().getName() + "$TimedService")
.tag("class", TimedService.class.getName())
.tag("method", "callRaisingError")
.tag("extra", "tag")
.tag("exception", "TestError")
Expand All @@ -159,7 +159,7 @@ void timeMethodWithErrorAndLongTaskTimer() {
assertThatThrownBy(service::longCallRaisingError).isInstanceOf(TestError.class);

assertThat(registry.get("longCallRaisingError")
.tag("class", getClass().getName() + "$TimedService")
.tag("class", TimedService.class.getName())
.tag("method", "longCallRaisingError")
.tag("extra", "tag")
.longTaskTimer()
Expand All @@ -184,7 +184,7 @@ void timeMethodWhenCompleted() {
completableFuture.join();

assertThat(registry.get("call")
.tag("class", getClass().getName() + "$AsyncTimedService")
.tag("class", AsyncTimedService.class.getName())
.tag("method", "call")
.tag("extra", "tag")
.tag("exception", "none")
Expand All @@ -210,7 +210,7 @@ void timeMethodWhenCompletedExceptionally() {
assertThatThrownBy(completableFuture::join).isInstanceOf(CompletionException.class);

assertThat(registry.get("call")
.tag("class", getClass().getName() + "$AsyncTimedService")
.tag("class", AsyncTimedService.class.getName())
.tag("method", "call")
.tag("extra", "tag")
.tag("exception", "IllegalStateException")
Expand All @@ -233,7 +233,7 @@ void timeMethodWhenReturnCompletionStageNull() {
assertThat(registry.getMeters()).isNotEmpty();

assertThat(registry.get("callNull")
.tag("class", getClass().getName() + "$AsyncTimedService")
.tag("class", AsyncTimedService.class.getName())
.tag("method", "callNull")
.tag("extra", "tag")
.tag("exception", "none")
Expand All @@ -254,7 +254,7 @@ void timeMethodWithLongTaskTimerWhenCompleted() {
CompletableFuture<?> completableFuture = service.longCall(guardedResult);

assertThat(registry.find("longCall")
.tag("class", getClass().getName() + "$AsyncTimedService")
.tag("class", AsyncTimedService.class.getName())
.tag("method", "longCall")
.tag("extra", "tag")
.longTaskTimer()
Expand All @@ -264,7 +264,7 @@ void timeMethodWithLongTaskTimerWhenCompleted() {
completableFuture.join();

assertThat(registry.get("longCall")
.tag("class", getClass().getName() + "$AsyncTimedService")
.tag("class", AsyncTimedService.class.getName())
.tag("method", "longCall")
.tag("extra", "tag")
.longTaskTimer()
Expand All @@ -284,7 +284,7 @@ void timeMethodWithLongTaskTimerWhenCompletedExceptionally() {
CompletableFuture<?> completableFuture = service.longCall(guardedResult);

assertThat(registry.find("longCall")
.tag("class", getClass().getName() + "$AsyncTimedService")
.tag("class", AsyncTimedService.class.getName())
.tag("method", "longCall")
.tag("extra", "tag")
.longTaskTimer()
Expand All @@ -294,7 +294,7 @@ void timeMethodWithLongTaskTimerWhenCompletedExceptionally() {
assertThatThrownBy(completableFuture::join).isInstanceOf(CompletionException.class);

assertThat(registry.get("longCall")
.tag("class", getClass().getName() + "$AsyncTimedService")
.tag("class", AsyncTimedService.class.getName())
.tag("method", "longCall")
.tag("extra", "tag")
.longTaskTimer()
Expand All @@ -314,13 +314,13 @@ void timeMethodWithLongTaskTimerWhenReturnCompletionStageNull() {
assertThat(completableFuture).isNull();

assertThat(registry.get("longCallNull")
.tag("class", getClass().getName() + "$AsyncTimedService")
.tag("class", AsyncTimedService.class.getName())
.tag("method", "longCallNull")
.tag("extra", "tag")
.longTaskTimers()).hasSize(1);

assertThat(registry.find("longCallNull")
.tag("class", getClass().getName() + "$AsyncTimedService")
.tag("class", AsyncTimedService.class.getName())
.tag("method", "longCallNull")
.tag("extra", "tag")
.longTaskTimer()
Expand Down

0 comments on commit d1c8045

Please sign in to comment.