wu-sheng commented on a change in pull request #7554:
URL: https://github.com/apache/skywalking/pull/7554#discussion_r695368416



##########
File path: docs/en/setup/backend/trace-sampling.md
##########
@@ -8,15 +8,30 @@ segments have been collected and reported by agents, the 
backend would do their
 to understand why we called it `as consistent as possible` and `do their best 
to don't break the trace`.
 
 ## Set the sample rate
-In **agent-analyzer** module, you will find `sampleRate` setting.
+In **agent-analyzer** module, you will find `sampleRate` setting by the 
configuration `traceSampleRateSettingFile`.
 
 ```yaml
 agent-analyzer:
   default:
     ...
-    sampleRate: ${SW_TRACE_SAMPLE_RATE:10000} # The sample rate precision is 
1/10000. 10000 means 100% sample in default.
+    # The default sampling rate and the default trace latency time configured 
by the 'traceSampleRateSettingFile' file.
+    traceSampleRateSettingFile: 
${SW_TRACE_SAMPLE_RATE_SETTING_FILE:trace-sample-rate-setting.yml}
     forceSampleErrorSegment: ${SW_FORCE_SAMPLE_ERROR_SEGMENT:true} # When 
sampling mechanism activated, this config would make the error status segment 
sampled, ignoring the sampling rate.
-    slowTraceSegmentThreshold: ${SW_SLOW_TRACE_SEGMENT_THRESHOLD:-1} # Setting 
this threshold about the latency would make the slow trace segments sampled if 
they cost more time, even the sampling mechanism activated. The default value 
is `-1`, which means would not sample slow traces. Unit, millisecond.
+```
+
+We can configure sampling rate dynamically not only default globally but for 
the specified services in `trace-sample-rate-setting.yml`
+```yaml
+default:
+  # Default sampling rate that replaces the 
'agent-analyzer.default.sampleRate' since version 8.7.0
+  # The sample rate precision is 1/10000. 10000 means 100% sample in default.
+  sampleRate: 10000
+  # Default trace latency time that replaces the 
'agent-analyzer.default.slowTraceSegmentThreshold' since version 8.7.0

Review comment:
       Same as https://github.com/apache/skywalking/pull/7554/files#r695368325. 
This should be moved and corrected.




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