Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions datareservoirio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ def metric() -> logging.Logger:
if os.getenv(ENV_VAR_ENABLE_APP_INSIGHTS) is not None:
enable_app_insights = os.environ[ENV_VAR_ENABLE_APP_INSIGHTS].lower()
if enable_app_insights == "true" or enable_app_insights == "1":
# Prevent messages from being passed directly to ancestor logger handlers,
# since ancestor logger levels and filters are not considered during propagation.
# https://docs.python.org/3.12/library/logging.html#logging.Logger.propagate
logger.propagate = False
logger.setLevel(logging.DEBUG)
_ensure_azure_monitor_configured(
connection_string=environment._application_insight_connectionstring,
Expand Down
Loading