chore(log): Include entity context in log message text for searchability#113
Merged
chore(log): Include entity context in log message text for searchability#113
Conversation
Log aggregation systems like Datadog primarily search/display the message text, making structured fields less visible.
wsutina
commented
Feb 13, 2026
| slog.String("repo", repo), | ||
| slog.String("release", release), | ||
| slog.String("file", file)) | ||
| "org", org, |
Collaborator
Author
There was a problem hiding this comment.
Not sure which style we prefer (slog.String(...) vs "string"), I picked a later one because it's a simpler. But happy to go either way.
mpeyper
reviewed
Feb 15, 2026
internal/githubapp/tokens.go
Outdated
|
|
||
| if exists && time.Now().Add(tm.cacheConfig.RefreshBuffer).Before(cached.expiresAt) { | ||
| logger.DebugContext(ctx, "Using cached GitHub App token") | ||
| logger.DebugContext(ctx, fmt.Sprintf("Using cached GitHub App token for org %s", org), "org", org, "installation_id", installationID) |
There was a problem hiding this comment.
does "org", org, need to be here as well given the .FromContext(ctx).With("org", org) above?
Collaborator
Author
There was a problem hiding this comment.
Good point! I have updated the hint and fixed up the duplications 68e7f5b
mpeyper
approved these changes
Feb 15, 2026
mpeyper
left a comment
There was a problem hiding this comment.
I haven't checked every log thoroughly, but agree with the approach in general and the AI has done it's thing.
68e7f5b to
3bc3b29
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.
Log aggregation systems like Datadog primarily search/display the message text, making structured fields less visible.