File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -45,10 +45,11 @@ def log_filter(record: logging.LogRecord) -> bool:
45
45
full_file_name = os .path .join (record .pathname , record .filename )
46
46
telemetry .telemetry_writer .add_error (1 , record .msg % record .args , full_file_name , record .lineno )
47
47
48
+ logger = logging .getLogger (record .name )
49
+
48
50
# If rate limiting has been disabled (`DD_TRACE_LOGGING_RATE=0`) then apply no rate limit
49
- # If the record is debug, then do not apply any limits to any log
50
- # DEV: we rely on the logging level of the handler/logger to filter out debug logs
51
- if not _rate_limit or record .levelno == logging .DEBUG :
51
+ # If the logger is set to debug, then do not apply any limits to any log
52
+ if not _rate_limit or logger .getEffectiveLevel () == logging .DEBUG :
52
53
return False
53
54
# Allow 1 log record by name/level/pathname/lineno every X seconds
54
55
# DEV: current unix time / rate (e.g. 300 seconds) = time bucket
You can’t perform that action at this time.
0 commit comments