[GCP] Structured logging for GCP-only files#874
Open
mhutchinson wants to merge 6 commits intotransparency-dev:mainfrom
Open
[GCP] Structured logging for GCP-only files#874mhutchinson wants to merge 6 commits intotransparency-dev:mainfrom
mhutchinson wants to merge 6 commits intotransparency-dev:mainfrom
Conversation
3e5b366 to
5e5df75
Compare
AlCutter
reviewed
Mar 3, 2026
Collaborator
There was a problem hiding this comment.
Might be worth having a package per infra - I'm not entirely sure whether the go linker will be able to ditch all the unneeded stuff if it's all in the same package.
Contributor
Author
There was a problem hiding this comment.
I considered that but figured we could do it later if needed as its all internal. This thing doesn't have any big deps other than some strings, so I figured this is safe. Am I underestimating some hidden cost?
ce814bf to
a232146
Compare
mhutchinson
commented
Mar 4, 2026
Contributor
Author
mhutchinson
left a comment
There was a problem hiding this comment.
Looks like I forgot to press send on my batch of replies 🤦
7ca961b to
80be219
Compare
phbnf
reviewed
Mar 4, 2026
5b260fd to
5070153
Compare
Contributor
Author
This replaces klog with slog for GCP-only classes. This is a clear improvement in the GCP case as it only provides more context and clearer and more searchable debug logs, which will be attached to spans where appropriate. If we are happy with this, we can choose to continue replacing all klog with slog throughout. This will require different handlers for different environments. Or maybe we can just use the default handler for the other environments.
5070153 to
1293420
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This replaces klog with slog for GCP-only classes. This is a clear
improvement in the GCP case as it only provides more context and clearer
and more searchable debug logs, which will be attached to spans where
appropriate.
If we are happy with this, we can choose to continue replacing all klog
with slog throughout. This will require different handlers for different
environments. Or maybe we can just use the default handler for the other
environments.