Check if config was reloaded, remove all upstream metrics if it was r… (#327)

This commit is contained in:
KirillPamPam
2023-10-25 15:28:51 +04:00
committed by GitHub
parent 788db75b73
commit 8aa89a1945
12 changed files with 74 additions and 26 deletions

View File

@@ -2,7 +2,7 @@ package io.emeraldpay.dshackle.upstream
import io.emeraldpay.dshackle.Chain
import io.emeraldpay.dshackle.config.AuthConfig
import io.emeraldpay.dshackle.reader.JsonRpcReader
import io.emeraldpay.dshackle.reader.JsonRpcHttpReader
import io.emeraldpay.dshackle.upstream.rpcclient.JsonRpcHttpClient
import io.emeraldpay.dshackle.upstream.rpcclient.RpcMetrics
import io.micrometer.core.instrument.Counter
@@ -15,7 +15,7 @@ open class HttpRpcFactory(
private val basicAuth: AuthConfig.ClientBasicAuth?,
private val tls: ByteArray?,
) : HttpFactory {
override fun create(id: String?, chain: Chain): JsonRpcReader {
override fun create(id: String?, chain: Chain): JsonRpcHttpReader {
val metricsTags = listOf(
// "unknown" is not supposed to happen
Tag.of("upstream", id ?: "unknown"),