HendSame commented on pull request #7554:
URL: https://github.com/apache/skywalking/pull/7554#issuecomment-906948100


   @wu-sheng 
   https://github.com/apache/skywalking/pull/7554#discussion_r697134780
   According to your suggestion.
   About PolicySetting object:
   ```
       @Getter
       @Setter
       @ToString
       @AllArgsConstructor
       @NoArgsConstructor
       public static class SamplePolicy {
           private Integer rate;
           private Integer duration;
       }
   
       @ToString
       public static class SamplePolicySettings {
   
           @Getter
           // `default` is the keyword ,so named `global`
           private SamplePolicy global;
   
           @Getter
           private Map<String, SamplePolicy> services;
   
           SamplePolicySettings(Integer defaultRate, Integer defaultDuration) {
               SamplePolicy samplePolicy = new SamplePolicy(defaultRate, 
defaultDuration);
               this.global = samplePolicy;
               this.services = new ConcurrentHashMap<>();
           }
   
           public void addPolicy(String service, SamplePolicy samplePolicy) {
               this.services.put(service, samplePolicy);
           }
   
           public SamplePolicy getPolicy(String service) {
               return this.services.get(service);
           }
       }
   ```
   About default value: 
   ```
       // hard code
       private int getDefaultSampleRate() {
           return 10000;
       }
   
       // hard code
       private int getDefaultSlowTraceSegmentThreshold() {
           return -1;
       }
   ```
   And  `sampleRate` and s`lowTraceSegmentThreshold` been removed in 
AnalyzerModuleConfig.
   
    Is it ok?
   
   
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to