Skip to content

Comments

Switch Logger to GCP structured JSON logging via stderr#503

Draft
kmontemayor2-sc wants to merge 6 commits intomainfrom
gcp-structured-logging
Draft

Switch Logger to GCP structured JSON logging via stderr#503
kmontemayor2-sc wants to merge 6 commits intomainfrom
gcp-structured-logging

Conversation

@kmontemayor2-sc
Copy link
Collaborator

Replace google.cloud.logging.Client().setup_logging() with a StreamHandler writing JSON to stderr, which GCP's logging agent automatically parses into structured LogEntry fields. This removes the network dependency at log time, prevents dropped logs on crash, and produces queryable structured logs.

We need this so we get logs on graph store compute machines :/

I've looked and the other logs seem identical to me.

Scope of work done

Where is the documentation for this feature?: N/A

Did you add automated tests or write a test plan?

Updated Changelog.md? NO

Ready for code review?: NO

Replace google.cloud.logging.Client().setup_logging() with a StreamHandler
writing JSON to stderr, which GCP's logging agent automatically parses into
structured LogEntry fields. This removes the network dependency at log time,
prevents dropped logs on crash, and produces queryable structured logs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kmontemayor2-sc
Copy link
Collaborator Author

/unit_test_py

@kmontemayor2-sc
Copy link
Collaborator Author

/e2e_test

@kmontemayor2-sc
Copy link
Collaborator Author

/integration_test

@github-actions
Copy link
Contributor

github-actions bot commented Feb 20, 2026

GiGL Automation

@ 18:24:52UTC : 🔄 Python Unit Test started.

@ 19:45:50UTC : ✅ Workflow completed successfully.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 20, 2026

GiGL Automation

@ 18:24:54UTC : 🔄 E2E Test started.

@ 19:53:39UTC : ✅ Workflow completed successfully.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 20, 2026

GiGL Automation

@ 18:25:01UTC : 🔄 Integration Test started.

@ 19:40:33UTC : ✅ Workflow completed successfully.

kmonte and others added 5 commits February 20, 2026 18:37
Replace google.cloud.logging.Client().setup_logging() with a StreamHandler
writing JSON to stderr, which GCP's logging agent automatically parses into
structured LogEntry fields. This removes the network dependency at log time,
prevents dropped logs on crash, and produces queryable structured logs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace google.cloud.logging.Client().setup_logging() with a StreamHandler
writing JSON to stderr, which GCP's logging agent automatically parses into
structured LogEntry fields. This removes the network dependency at log time,
prevents dropped logs on crash, and produces queryable structured logs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…GiGL into gcp-structured-logging

# Conflicts:
#	gigl/common/formatters/__init__.py
#	gigl/common/formatters/gcp_json_formatter.py
#	gigl/common/logger.py
#	tests/unit/common/formatters/gcp_json_formatter_test.py
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