From caa02b676158320330203921089b3b7d64544e4c Mon Sep 17 00:00:00 2001 From: Darya Frolova <47457802+WilyTiger@users.noreply.github.com> Date: Wed, 16 Oct 2024 19:56:54 +0200 Subject: [PATCH] fix slow requests sampling rate (#2296) --- cloud/filestore/libs/daemon/common/bootstrap.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cloud/filestore/libs/daemon/common/bootstrap.cpp b/cloud/filestore/libs/daemon/common/bootstrap.cpp index f547884a8b3..55ffbddf7f2 100644 --- a/cloud/filestore/libs/daemon/common/bootstrap.cpp +++ b/cloud/filestore/libs/daemon/common/bootstrap.cpp @@ -376,12 +376,12 @@ void TBootstrapCommon::InitLWTrace( traceReaders.push_back(CreateTraceLogger(TraceLoggerId, traceLog, "NFS_TRACE")); } - if (auto samplingRate = Configs->DiagnosticsConfig->GetSlowRequestSamplingRate() && - !probesToTrace.empty()) - { + auto slowRequestSamplingRate = + Configs->DiagnosticsConfig->GetSlowRequestSamplingRate(); + if (slowRequestSamplingRate && !probesToTrace.empty()) { NLWTrace::TQuery query = ProbabilisticQuery( probesToTrace, - samplingRate, + slowRequestSamplingRate, Configs->DiagnosticsConfig->GetLWTraceShuttleCount()); lwManager.New(SlowRequestsFilterId, query);