Open
Description
This is likely not a bug, but any guidance to help troubleshoot this would be much appreciated.
I'm using google cloud logging v2 in an GCP cloud function, this was working fine until recently our logs started to produce error messages like the one below (truncated precisely at the rpc(
block).
"Traceback (most recent call last):
File "/layers/google.python.pip/pip/lib/python3.12/site-packages/google/cloud/logging_v2/handlers/transports/background_thread.py", line 122, in _safely_commit_batch
batch.commit()
File "/layers/google.python.pip/pip/lib/python3.12/site-packages/google/cloud/logging_v2/logger.py", line 514, in commit
raise e
File "/layers/google.python.pip/pip/lib/python3.12/site-packages/google/cloud/logging_v2/logger.py", line 507, in commit
client.logging_api.write_entries(
File "/layers/google.python.pip/pip/lib/python3.12/site-packages/google/cloud/logging_v2/_gapic.py", line 167, in write_entries
self._gapic_api.write_log_entries(request=request)
File "/layers/google.python.pip/pip/lib/python3.12/site-packages/google/cloud/logging_v2/services/logging_service_v2/client.py", line 1008, in write_log_entries
response = rpc("
as far as I'm aware we're using logger in a standard way:
LOGGING_CLIENT = google.cloud.logging.Client(
project=GCP_PROJECT_ID,
credentials=GCP_CREDENTIALS
)
# ...
handler = CloudLoggingHandler(
client=LOGGING_CLIENT,
name=name,
)
setup_logging(
handler=handler,
log_level=level,
)
logger = logging.getLogger()
# ...
logger.log(level=..., msg=...)