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/07/05 03:43:09 UTC
[GitHub] [skywalking] HendSame edited a comment on pull request #7194: Support configure sampling rate dynamically for service dimension on the backend side
HendSame edited a comment on pull request #7194:
URL: https://github.com/apache/skywalking/pull/7194#issuecomment-873760663
> The boundary between `custom-trace-sample-rate` and existing `sampleRate` is not clear. If you want to do service based sample rate setting, the first step should make it supported in static configuration. Sample rate is a static configuration in the `application.yml`, you should make it separate in another `trace-sample-rate-setting.yml`, then, make the dynamic configuration works. Also, this should not be a different configuration than existing logic, otherwise, the users would be very confused, which sample rate would take effect if they set both.
Like that configure sampling rate by the same configuration in the `application.yml`?
```
agent-analyzer:
selector: ${SW_AGENT_ANALYZER:default}
default:
#sampleRate: ${SW_TRACE_SAMPLE_RATE:10000} # The config had moved to 'traceSampleRateSettingFile' and had been replaced by 'global.sampleRate' that the config in 'traceSampleRateSettingFile'.
#slowTraceSegmentThreshold: ${SW_SLOW_TRACE_SEGMENT_THRESHOLD:-1} # The config had moved to 'traceSampleRateSettingFile' and had been replaced by 'global.duration' that the config in 'traceSampleRateSettingFile'.
traceSampleRateSettingFile: ${SW_TRACE_SAMPLE_RATE_SETTING_FILE:trace-sample-rate-setting.yml}
```
And `trace-sample-rate-setting.yml`:
```
global:
sampleRate: 10000 # the replace the old config `sampleRate` in the application.yml.
duration: 10000 # the replace the old config `slowTraceSegmentThreshold` in the application.yml
services:
- name: serverName # the server name which show skywalking-ui
sampleRate: 1000 # endpoint latitude. It has a higher priority than `global.sampleRate`
duration: 10000 # trace latency time. It has a higher priority than `global.duration`
```
--
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: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org