Skip to content

Commit

Permalink
feat: 解决DdcMeterBinder循环依赖TencentBlueKing#2461
Browse files Browse the repository at this point in the history
  • Loading branch information
zacYL committed Aug 5, 2024
1 parent a67e1bd commit 8c21303
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import io.micrometer.core.instrument.binder.MeterBinder
import org.springframework.stereotype.Component

@Component
class DdcMeterBinder(private val registry: MeterRegistry) : MeterBinder {
class DdcMeterBinder : MeterBinder {
/**
* ref inline加载耗时
*/
Expand Down Expand Up @@ -65,7 +65,11 @@ class DdcMeterBinder(private val registry: MeterRegistry) : MeterBinder {
*/
lateinit var legacyRefStoreTimer: Timer

private lateinit var registry: MeterRegistry


override fun bindTo(registry: MeterRegistry) {
this.registry = registry
refInlineLoadTimer = Timer
.builder(DDC_REF_LOAD)
.tag("inline", "true")
Expand Down

0 comments on commit 8c21303

Please sign in to comment.