All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bybutter.sisyphus.middleware.kafka.autoconfigure.KafkaMetricsAutoConfiguration.kt Maven / Gradle / Ivy

There is a newer version: 2.1.22
Show newest version
package com.bybutter.sisyphus.middleware.kafka.autoconfigure

import com.bybutter.sisyphus.middleware.kafka.KafkaLogger
import com.bybutter.sisyphus.middleware.kafka.metrics.MicrometerKafkaLogger
import io.micrometer.core.instrument.MeterRegistry
import org.springframework.boot.autoconfigure.AutoConfiguration
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass
import org.springframework.context.annotation.Bean

@AutoConfiguration(
    afterName = ["org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration", "org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration"],
    beforeName = ["org.springframework.boot.actuate.autoconfigure.metrics.web.reactive.WebFluxMetricsAutoConfiguration"]
)
@ConditionalOnClass(name = ["io.micrometer.core.instrument.MeterRegistry"])
class KafkaMetricsAutoConfiguration {
    @Bean
    fun micrometerKafkaMqLogger(registry: MeterRegistry): KafkaLogger {
        return MicrometerKafkaLogger(registry)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy