We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 894e4cf commit 90e8e4fCopy full SHA for 90e8e4f
1 file changed
internal/controller/controller.go
@@ -164,6 +164,10 @@ func (c *Controller) Shutdown() {
164
// UpdateSamplingFrequency dynamically updates the sampling frequency for both the tracer
165
// and reporter.
166
func (c *Controller) UpdateSamplingFrequency(newSamplesPerSecond int) error {
167
+ if newSamplesPerSecond < 1 {
168
+ return fmt.Errorf("invalid sampling frequency: %d (must be >= 1)", newSamplesPerSecond)
169
+ }
170
+
171
if c.tracer == nil {
172
return fmt.Errorf("tracer is not initialized")
173
}
0 commit comments