You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/01/01 03:19:52 UTC

[GitHub] [skywalking] xuanyu66 commented on issue #6105: agent's switch at runtime

xuanyu66 commented on issue #6105:
URL: https://github.com/apache/skywalking/issues/6105#issuecomment-753246872


   @wu-sheng 
   ```
           if (Config.Agent.SAMPLE_N_PER_3_SECS > 0) {
               on = true;
               this.resetSamplingFactor();
               ScheduledExecutorService service = Executors.newSingleThreadScheduledExecutor(
                   new DefaultNamedThreadFactory("SamplingService"));
               scheduledFuture = service.scheduleAtFixedRate(new RunnableWithExceptionProtection(
                   this::resetSamplingFactor, t -> LOGGER.error("unexpected exception.", t)), 0, 3, TimeUnit.SECONDS);
               LOGGER.debug(
                   "Agent sampling mechanism started. Sample {} traces in 3 seconds.", Config.Agent.SAMPLE_N_PER_3_SECS);
           }
   ```
   you are right.So how to disable the sampling mechanism?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org