Skip to content

chore(log): Include entity context in log message text for searchability#113

Merged
wsutina merged 2 commits intomainfrom
swipawiwat/log-standard
Feb 16, 2026
Merged

chore(log): Include entity context in log message text for searchability#113
wsutina merged 2 commits intomainfrom
swipawiwat/log-standard

Conversation

@wsutina
Copy link
Collaborator

@wsutina wsutina commented Feb 13, 2026

Log aggregation systems like Datadog primarily search/display the message text, making structured fields less visible.

Log aggregation systems like Datadog primarily search/display the message
text, making structured fields less visible.
@wsutina wsutina requested a review from a team as a code owner February 13, 2026 06:21
@wsutina wsutina requested review from nssherpa and removed request for a team February 13, 2026 06:21
slog.String("repo", repo),
slog.String("release", release),
slog.String("file", file))
"org", org,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

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.


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)
Copy link

Choose a reason for hiding this comment

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

does "org", org, need to be here as well given the .FromContext(ctx).With("org", org) above?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point! I have updated the hint and fixed up the duplications 68e7f5b

Copy link

@mpeyper mpeyper left a comment

Choose a reason for hiding this comment

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

I haven't checked every log thoroughly, but agree with the approach in general and the AI has done it's thing.

@wsutina wsutina force-pushed the swipawiwat/log-standard branch from 68e7f5b to 3bc3b29 Compare February 16, 2026 00:41
@wsutina wsutina merged commit 000c40e into main Feb 16, 2026
5 checks passed
@wsutina wsutina deleted the swipawiwat/log-standard branch February 16, 2026 00:42
alecthomas added a commit that referenced this pull request Feb 17, 2026
alecthomas added a commit that referenced this pull request Feb 17, 2026
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

Comments