Skip to content
Open
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
11 changes: 11 additions & 0 deletions snuba/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ def setup_logging(level: Optional[str] = None) -> None:
force=True,
)

# google-auth's httplib2 transport emits a spurious WARNING on every token
# refresh: "httplib2 transport does not support per-request timeout. Set the
# timeout when constructing the httplib2.Http instance." Since google-auth
# >= 2.39.0 the transport is always handed a per-request timeout (e.g. when
# refreshing service-account tokens against the GKE metadata server), and the
# warning fires regardless of how the Http instance was built -- googleapiclient
# already constructs it with a construction-time timeout, so there is nothing
# to "fix" on our side. The message is pure noise (132k+ events on snuba-admin
# with zero user impact), so drop everything below ERROR for this logger. (SNUBA-8P5)
logging.getLogger("google_auth_httplib2").setLevel(logging.ERROR)

structlog.configure(
cache_logger_on_first_use=True,
wrapper_class=structlog.make_filtering_bound_logger(logging.INFO),
Expand Down
Loading