File tree 2 files changed +4
-2
lines changed
aws_lambda_powertools/metrics/provider
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,8 @@ def is_metrics_disabled() -> bool:
94
94
if constants .METRICS_DISABLED_ENV not in os .environ :
95
95
return False
96
96
97
- is_disabled = resolve_truthy_env_var_choice (env = os .getenv (constants .METRICS_DISABLED_ENV ))
97
+ env_value = os .getenv (constants .METRICS_DISABLED_ENV )
98
+ is_disabled = resolve_truthy_env_var_choice (env = env_value or "false" )
98
99
if is_disabled :
99
100
logger .debug ("Metrics have been disabled via env var POWERTOOLS_METRICS_DISABLED" )
100
101
return bool (is_disabled )
Original file line number Diff line number Diff line change @@ -73,7 +73,8 @@ def is_metrics_disabled() -> bool:
73
73
if constants .METRICS_DISABLED_ENV not in os .environ :
74
74
return False
75
75
76
- is_disabled = resolve_truthy_env_var_choice (env = os .getenv (constants .METRICS_DISABLED_ENV ))
76
+ env_value = os .getenv (constants .METRICS_DISABLED_ENV )
77
+ is_disabled = resolve_truthy_env_var_choice (env = env_value or "false" )
77
78
if is_disabled :
78
79
logger .debug ("Metrics have been disabled via env var POWERTOOLS_METRICS_DISABLED" )
79
80
return bool (is_disabled )
You can’t perform that action at this time.
0 commit comments