From 7fec255e1dbbda881cfefb7ed59f4777f22d2c81 Mon Sep 17 00:00:00 2001 From: Sabari Sanjeevi Date: Fri, 29 Jul 2022 11:23:02 -0700 Subject: [PATCH] Reduce root trace generation to a minimum --- client/clientservice/src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/clientservice/src/main.cpp b/client/clientservice/src/main.cpp index bdde47408b..7a168d0a3a 100644 --- a/client/clientservice/src/main.cpp +++ b/client/clientservice/src/main.cpp @@ -37,6 +37,7 @@ using concord::client::concordclient::ConcordClientConfig; namespace po = boost::program_options; const static int kLogConfigRefreshIntervalInMs = 60 * 1000; +const double kTraceSamplingRate = 0.000001; static std::unique_ptr clientservice = nullptr; const static char* getLog4CplusConfigLocation() { @@ -90,7 +91,7 @@ class JaegerLogger : public jaegertracing::logging::Logger { void initJaeger(const std::string& addr) { // No sampling for now - report all traces - jaegertracing::samplers::Config sampler_config(jaegertracing::kSamplerTypeConst, 1.0); + jaegertracing::samplers::Config sampler_config(jaegertracing::kSamplerTypeConst, kTraceSamplingRate); jaegertracing::reporters::Config reporter_config(jaegertracing::reporters::Config::kDefaultQueueSize, jaegertracing::reporters::Config::defaultBufferFlushInterval(), false /* false=don't log spans, true=JaegerUI */,