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

MNT Removing the Fluentd setup and updating to default to GCP logging #4668

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

vitaliset
Copy link
Collaborator

No description provided.

@vitaliset vitaliset force-pushed the fluentd_removal branch 2 times, most recently from 52a90e7 to 2e4a1c0 Compare February 19, 2025 20:13
@vitaliset vitaliset marked this pull request as ready for review February 20, 2025 20:26
Copy link
Collaborator

@oliverchang oliverchang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great generally! just a minor nit + a question.

This is disabled for local development and if we are running in a app engine
or kubernetes as these have their dedicated loggers, see
configure_appengine() and configure_k8s()."""
return bool(os.getenv('LOG_TO_GCP')) and not _is_local(
) and not _is_running_on_app_engine() and not _is_running_on_k8s()
return (bool(os.getenv("LOG_TO_GCP", "True")) and
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: use single quotes for strings.

@@ -412,6 +389,8 @@ def cloud_label_filter(record):

handler.addFilter(cloud_label_filter)
handler.setLevel(logging.INFO)
formatter = JsonFormatter()
handler.setFormatter(formatter)

logging.getLogger().addHandler(handler)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will we still have file logs in the bots directory this way? This can be a followup TODO if not.

File logs have been very useful in the past for debugging, when cloud logs somehow don't exist (e.g. network or some other issue).

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

Successfully merging this pull request may close these issues.

2 participants