diff options
author | auzhegov <auzhegov@yandex-team.com> | 2023-02-14 17:11:31 +0300 |
---|---|---|
committer | auzhegov <auzhegov@yandex-team.com> | 2023-02-14 17:11:31 +0300 |
commit | 259d6c82f12638dbde5b2c351212f60eba10c4ea (patch) | |
tree | d3e902e1354d14a9c4372a38f306dcfc9019e3d5 | |
parent | f4cb98ca7bfdaa3f9fafe8f903b0eaf951641edc (diff) | |
download | ydb-259d6c82f12638dbde5b2c351212f60eba10c4ea.tar.gz |
[Sensors type change] Caching FQDN IP resolution for lib curl usage
-rw-r--r-- | ydb/library/yql/providers/common/http_gateway/yql_dns_gateway.h | 12 | ||||
-rw-r--r-- | ydb/library/yql/providers/common/http_gateway/yql_http_gateway.cpp | 2 |
2 files changed, 5 insertions, 9 deletions
diff --git a/ydb/library/yql/providers/common/http_gateway/yql_dns_gateway.h b/ydb/library/yql/providers/common/http_gateway/yql_dns_gateway.h index 6da4bba88a..3e260acff7 100644 --- a/ydb/library/yql/providers/common/http_gateway/yql_dns_gateway.h +++ b/ydb/library/yql/providers/common/http_gateway/yql_dns_gateway.h @@ -52,14 +52,10 @@ public: ::NMonitoring::TDynamicCounterPtr counters) : IsStopped(false) , UpdateInterval(std::chrono::milliseconds(dnsResolverConfig.GetRefreshMs())) - , TotalResolutionCounter( - counters->GetCounter("DNSGateway_TotalResolutions")) - , ResolutionSuccessCounter( - counters->GetCounter("DNSGateway_ResolutionSuccesses")) - , ResolutionErrorCounter( - counters->GetCounter("DNSGateway_ResolutionErrors")) - , ResolvedToNotExpectedIP( - counters->GetCounter("DNSGateway_ResolvedToNotExpectedIP")) { + , TotalResolutionCounter(counters->GetCounter("TotalResolutions", true)) + , ResolutionSuccessCounter(counters->GetCounter("ResolutionSuccesses", true)) + , ResolutionErrorCounter(counters->GetCounter("ResolutionErrors", true)) + , ResolvedToNotExpectedIP(counters->GetCounter("ResolvedToNotExpectedIP", true)) { if (dnsResolverConfig.HasRefreshMs()) { UpdateInterval = std::chrono::milliseconds(dnsResolverConfig.GetRefreshMs()); } diff --git a/ydb/library/yql/providers/common/http_gateway/yql_http_gateway.cpp b/ydb/library/yql/providers/common/http_gateway/yql_http_gateway.cpp index 4e700956ed..4926eaa37b 100644 --- a/ydb/library/yql/providers/common/http_gateway/yql_http_gateway.cpp +++ b/ydb/library/yql/providers/common/http_gateway/yql_http_gateway.cpp @@ -473,7 +473,7 @@ public: explicit THTTPMultiGateway( const THttpGatewayConfig* httpGatewaysCfg, ::NMonitoring::TDynamicCounterPtr counters) - : DnsGateway(httpGatewaysCfg ? httpGatewaysCfg->GetDnsResolverConfig(): TDnsResolverConfig{}, counters) + : DnsGateway(httpGatewaysCfg ? httpGatewaysCfg->GetDnsResolverConfig(): TDnsResolverConfig{}, counters->GetSubgroup("subsystem", "dns_gateway")) , Counters(std::move(counters)) , Rps(Counters->GetCounter("Requests", true)) , InFlight(Counters->GetCounter("InFlight")) |