You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] sampling rate of dynamic configuration using DCS does not work #13836
I had searched in the issues and found no similar issues.
Apache SkyWalking Component
OAP server (apache/skywalking)
What happened
Hello,
I've written the call() function of my grpc server to configure sampling rate. Oap log shows it calls call() function and parse the sampling rate correctly. But skywalking ui shows the same trace frequecy.
What you expected to happen
the sampling rate dynamic configuration works via grpc.
if (Objects.equals(uuid, responseUuid)) {
// If UUID matched, the config table is expected as empty.returnOptional.empty();
}
The OAP sends the last UUID it saw; if your server returns the same UUID, the OAP treats the poll as "no change" and never re-notifies the watcher — even if ConfigTable carries a new value. Your log showing call() being hit and the value being parsed is consistent with the first poll succeeding and every subsequent poll being ignored. Your server must bump the UUID (or hash the payload, or use the row's updated_at) whenever the value bytes change.
2. Is qewqw-test::myapmmysqlservice actually an agent-reported service name, or is it a virtual database node in the topology?
TraceSegmentSampler#shouldSample matches on segmentObject.getService() — the name the agent sets for itself, not any synthesized entity. The :: pattern usually shows up on conjured nodes like virtual databases / MQ / caches that SkyWalking derives from span relations; those are never carried as a segment's service field, so a services[].name rule targeting them will never match. If that's the case here, your rate: 100 override is silently ignored and only default.rate: 10000 (= 100%) applies — which is exactly "UI shows the same trace frequency."
Could you confirm both? If (1) is the cause, the fix is on your gRPC server side. If (2) is the cause, you'll want to put the agent's own service name in services[].name instead.
Activity
wu-sheng commentedon Apr 21, 2026
Hi @ranxuxin001, before we dig into this as a bug, two questions — either one can fully explain what you're seeing:
1. Does
s.currentUUIDchange every time the underlying MySQL config changes?The DCS gRPC protocol is version-based, not push-based. See
GRPCConfigWatcherRegister#readConfig:The OAP sends the last UUID it saw; if your server returns the same UUID, the OAP treats the poll as "no change" and never re-notifies the watcher — even if
ConfigTablecarries a new value. Your log showingcall()being hit and the value being parsed is consistent with the first poll succeeding and every subsequent poll being ignored. Your server must bump the UUID (or hash the payload, or use the row'supdated_at) whenever the value bytes change.2. Is
qewqw-test::myapmmysqlserviceactually an agent-reported service name, or is it a virtual database node in the topology?TraceSegmentSampler#shouldSamplematches onsegmentObject.getService()— the name the agent sets for itself, not any synthesized entity. The::pattern usually shows up on conjured nodes like virtual databases / MQ / caches that SkyWalking derives from span relations; those are never carried as a segment'sservicefield, so aservices[].namerule targeting them will never match. If that's the case here, yourrate: 100override is silently ignored and onlydefault.rate: 10000(= 100%) applies — which is exactly "UI shows the same trace frequency."Could you confirm both? If (1) is the cause, the fix is on your gRPC server side. If (2) is the cause, you'll want to put the agent's own service name in
services[].nameinstead.