Skip to content

Cleanup logging#137

Merged
temporal-nick merged 1 commit intomainfrom
pglass/log-cleanup
Aug 19, 2025
Merged

Cleanup logging#137
temporal-nick merged 1 commit intomainfrom
pglass/log-cleanup

Conversation

@pglass
Copy link
Contributor

@pglass pglass commented Aug 18, 2025

What was changed

This cleans up some logging calls.

  • Remove a couple per-request logs that are noisy
  • Remove unhelpful Debug logs
  • Use log tags instead of Sprintf where possible
  • Remove printf format strings that aren't used
  • Avoid using log.With on a per-request path since it allocates

Why?

Tidy up our logging a bit.

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

@pglass pglass requested a review from yux0 August 18, 2025 14:24
@pglass pglass requested a review from a team as a code owner August 18, 2025 14:24
i.logger.Debug("InterceptStream", tag.NewAnyTag("method", info.FullMethod))
err := handler(srv, newStreamTranslator(ss, i.logger, i.translators))
if err != nil {
i.logger.Error("grpc handler with error: %v", tag.Error(err))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this log still valuable if it's behind a throttle that restricts it to 1/min?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My guess is not? I think in general the error is usually just EOF.

Also, if it is valuable, we should log this gRPC error in a spot that is always enabled (not just when the translation interceptor is enabled)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do think we should tune the log throttle to be component-based (and maybe have component-based log settings)

@temporal-nick temporal-nick merged commit f8e1fa0 into main Aug 19, 2025
6 checks passed
@temporal-nick temporal-nick deleted the pglass/log-cleanup branch August 19, 2025 20:09
hai719 pushed a commit to hai719/s2s-proxy that referenced this pull request Nov 24, 2025
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