-
Notifications
You must be signed in to change notification settings - Fork 208
Description
Expected behavior
Adding an attribute to a log and add a filter with this attribute should remove the log in Application Insights.
This was the behavior since at least version 3.4.x until version 3.7.1
Actual behavior
The attribute is added, the log is modified accordingly, but the log is not filtered.
To Reproduce
applicationinsights.json:
{ "sampling": { "percentage": 100, "overrides": [{ "telemetryType": "trace", "attributes": [{ "key": "TODELETE", "value": ".*", "matchType": "regexp" } ], "percentage": 0 } ] }, "preview": { "processors": [{ "type": "log", "body": { "toAttributes": { "rules": [ "^Noisy log (?<TODELETE>.*)" ] } } } ] } }
In the application, add a noisy log:
logger.info { "Noisy log that should not be sent to AppInsights" }
System information
Please provide the following information:
- SDK Version: 3.7.2 to 3.7.5 KO, 3.4.x to 3.7.1 OK
- Using spring-boot: yes
I suspect that starting version 3.7.2, the 'sampling overrides' and the 'attribute processors' are not handled in the same order (processor then sampling before 3.7.2, sampling then processor starting 3.7.2).