You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 13, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 13, 2026. It is now read-only.
I noticed the Stackdriver module supports usage with grpc installed, which is great. However it currently still tries to import _gapic even if grpc usage is explicitly disabled via env var. This causes some additional latency for cli & serverless usage.
$ cat x.py
import time
import sys
def main():
mcount = len(sys.modules)
t = time.time()
from google.cloud.logging import Client
print("modules:%d %0.2f sec" % (
len(sys.modules) - mcount, time.time() - t))
if __name__ == '__main__':
main()
@kapilt this could be done. Today this is mostly done to guard against cases where gRPC isn't available. Would you be interested in submitting a PR for this change?
Activity
crwilcox commentedon Dec 26, 2018
@kapilt this could be done. Today this is mostly done to guard against cases where gRPC isn't available. Would you be interested in submitting a PR for this change?
[-]google.cloud.logging - don't import grpc if grpc disabled[/-][+]Logging: don't import grpc if grpc disabled[/+]daniel-sanche commentedon Oct 15, 2021
This will be fixed in thbe v3.0.0 release