Description
Hi, I'm having an issue with the additional detect_resource
call that was added in 3.0.0. When I'm running on my dev machine, any traffic out to metadata.google.internal is black-holed, and hangs until urllib times out (1-2 mins). In 2.x, I was able to get around this behavior by either supplying the resource to setup_logging
as a kwarg (which eliminated the need to call detect_resource
), or by instantiating the CloudLoggingHandler
manually.
In 3.0.0 it seems it is no longer possible to bypass the call to detect_resource
, because the transport class is instantiating a logger without passing down anything except for name:
Which will always result in a call to detect_resource
:
python-logging/google/cloud/logging_v2/logger.py
Lines 71 to 73 in d86be6c
This is probably an edge case, but I figured I'd mention it because regardless of the hanging request, it is kind of weird that it calls detect_resource
when I've already passed in a resource.