diff --git a/build.gradle.kts b/build.gradle.kts index 5aaa4cc9..f05d5bd0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -74,6 +74,7 @@ dependencies { implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2") implementation("org.springframework.boot:spring-boot-starter-actuator") implementation("io.micrometer:micrometer-registry-prometheus") + implementation("io.github.kdprog:cxf-micrometer-metrics:1.0.0") } tasks.withType { diff --git a/src/main/kotlin/com/group4/ticketingservice/config/CxfMicrometerConfig.kt b/src/main/kotlin/com/group4/ticketingservice/config/CxfMicrometerConfig.kt new file mode 100644 index 00000000..191fcca7 --- /dev/null +++ b/src/main/kotlin/com/group4/ticketingservice/config/CxfMicrometerConfig.kt @@ -0,0 +1,13 @@ +package com.group4.ticketingservice.config + +import io.micrometer.config.MicrometerFactoryBeanListener +import io.micrometer.core.instrument.MeterRegistry +import org.springframework.context.annotation.Bean + +class CxfMicrometerConfig { + + @Bean + fun cxfMicrometerBean(registry: MeterRegistry?): MicrometerFactoryBeanListener { + return MicrometerFactoryBeanListener(registry) + } +}