Skip to content

Commit

Permalink
Fix ratelimiter for config probe
Browse files Browse the repository at this point in the history
Signed-off-by: grantseltzer <[email protected]>
  • Loading branch information
grantseltzer committed Dec 20, 2024
1 parent ea66791 commit eecb032
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/dynamicinstrumentation/diconfig/config_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,17 @@ func (cm *RCConfigManager) installConfigProbe(procInfo *ditypes.ProcessInfo) err

func (cm *RCConfigManager) readConfigs(r *ringbuf.Reader, procInfo *ditypes.ProcessInfo) {
log.Tracef("Waiting for configs for service: %s", procInfo.ServiceName)
configRateLimiter := ratelimiter.NewMultiProbeRateLimiter(0.0)
configRateLimiter.SetRate(ditypes.ConfigBPFProbeID, 0)

for {
record, err := r.Read()
if err != nil {
log.Errorf("error reading raw configuration from bpf: %v", err)
continue
}

rateLimiters := ratelimiter.NewMultiProbeRateLimiter(0.0)
rateLimiters.SetRate(ditypes.ConfigBPFProbeID, 0)

configEvent, err := eventparser.ParseEvent(cm.diProcs, record.RawSample, rateLimiters)
configEvent, err := eventparser.ParseEvent(cm.diProcs, record.RawSample, configRateLimiter)
if err != nil {
log.Errorf("error parsing configuration for PID %d: %v", procInfo.PID, err)
continue
Expand Down

0 comments on commit eecb032

Please sign in to comment.