Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloud Logging in processor does not show severity #4062

Open
KyleJu opened this issue Oct 16, 2024 · 1 comment
Open

Cloud Logging in processor does not show severity #4062

KyleJu opened this issue Oct 16, 2024 · 1 comment

Comments

@KyleJu
Copy link
Collaborator

KyleJu commented Oct 16, 2024

After the previous migration from AppEngine logging to Google Cloud Logging, Cloud Logging in processor needs improvements:

  • Logs in the processor are not labelled with proper severity, thus very difficult to spot and filter error logs
  • Logs are not structured, thus difficult to find related logs
  • Filled with unimportant log entries ,e.g. server health checks
@gsnedders
Copy link
Member

On the results-processor side we have:

# Hack to work around the bad logging setup of google.cloud.*:
# https://github.com/googleapis/google-cloud-python/issues/6742
logging.getLogger().handlers = []
logging.basicConfig(level=logging.INFO)

Which links to googleapis/google-cloud-python#6742, which was actually a long-ago fixed but in grpc: grpc/grpc#17017

We probably need to do the configuration for the integration with the Python stdlib logging: https://cloud.google.com/python/docs/reference/logging/3.11.0/std-lib-integration

#4044 also raised the possibility of "more detailed logging as to what exactly is accessing the secrets (run_id, uploader would be obvious — or maybe we should do this for all logging from the processor via a LoggerAdapter?)" — and that seems like a worthwhile thing to do. (We could even encode these as an operation, but idk if that makes sense.)

Tracing might also be worthwhile to consider, to understand the interaction between the main webapp API and the processor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants