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
### What does this PR do?
> [!NOTE]
> [Feature documentation](https://datadoghq.atlassian.net/wiki/x/EgK5nQE).
This links anomaly detection events to adaptive sampling to have different profiles given severity state.
```yaml
logs_config:
experimental_adaptive_sampling:
enabled: true
rate_limit: 1
burst_size: 100
# New config
smart_severity_profiles:
enabled: true
medium:
rate_limit: 1
burst_size: 1000
high:
rate_limit: 100
burst_size: 1000
```
Adds:
- Logic to `preprocessor/sampler.go` such that it reads the `severityevents` state and apply the specific sampling profile given the severity
- `smart_adaptive_log_sampling_nix_test.go` e2e test to test this feature (1. check high sampling in low state, 2. check low sampling in high state)
### Motivation
### Describe how you validated your changes
1. Config smart severity profiles + adaptive sampling
2. The low profile must be the first one applied
3. When we have anomalies (medium / high severity), the other profiles must be set. We can set the burst size to a high value and check if bursts of logs are sent or not
There is an e2e tests for this.
### Additional Notes
Passthrough / cooldown are left for a [future PR](#53432).
<img width="573" height="800" alt="Screenshot 2026-07-09 at 09 41 50" src="https://github.com/user-attachments/assets/343e59d4-ab53-4977-8f81-071dbc2cbe6d" />
[AAD-4]: https://datadoghq.atlassian.net/browse/AAD-4?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Co-authored-by: eman.okyere <eman.okyere@datadoghq.com>
assert.Equal(t, want, got.Profiles[severityeventsdef.SeverityHigh], "high's unconfigured rate_limit must cascade from medium, not revert to low, so high is never less permissive than medium")
776
+
})
777
+
778
+
t.Run("smart severity profiles enabled: unset high falls back to configured medium", func(t*testing.T) {
0 commit comments