-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-214: [feat] Add ObservationConfig for micrometer observation support.
- Loading branch information
1 parent
9fc48a8
commit 8250ad1
Showing
4 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
...ices/email-service/src/main/java/app/sportahub/emailservice/config/ObservationConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package app.sportahub.emailservice.config; | ||
|
||
import io.micrometer.observation.ObservationRegistry; | ||
import io.micrometer.observation.aop.ObservedAspect; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class ObservationConfig { | ||
|
||
@Bean | ||
ObservedAspect observedAspect(ObservationRegistry observationRegistry) { | ||
return new ObservedAspect(observationRegistry); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...ices/event-service/src/main/java/app/sportahub/eventservice/config/ObservationConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import io.micrometer.observation.ObservationRegistry; | ||
import io.micrometer.observation.aop.ObservedAspect; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class ObservationConfig { | ||
|
||
@Bean | ||
ObservedAspect observedAspect(ObservationRegistry observationRegistry) { | ||
return new ObservedAspect(observationRegistry); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
Microservices/gateway/src/main/java/app/sportahub/gateway/config/ObservationConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import io.micrometer.observation.ObservationRegistry; | ||
import io.micrometer.observation.aop.ObservedAspect; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class ObservationConfig { | ||
|
||
@Bean | ||
ObservedAspect observedAspect(ObservationRegistry observationRegistry) { | ||
return new ObservedAspect(observationRegistry); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...rvices/user-service/src/main/java/app/sportahub/userservice/config/ObservationConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package app.sportahub.userservice.config; | ||
|
||
import io.micrometer.observation.ObservationRegistry; | ||
import io.micrometer.observation.aop.ObservedAspect; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class ObservationConfig { | ||
|
||
@Bean | ||
ObservedAspect observedAspect(ObservationRegistry observationRegistry) { | ||
return new ObservedAspect(observationRegistry); | ||
} | ||
} |