-
Notifications
You must be signed in to change notification settings - Fork 65
streaming: Remove logging pair and key on failure #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -151,8 +151,7 @@ func (c *Conn) manageForever() { | |||
|
|||
for { | |||
if err := c.connect(); err != nil { | |||
log.Printf("luno/streaming: Connection error key=%s pair=%s: %v", | |||
c.keyID, c.pair, err) | |||
log.Printf("luno/streaming: Connection error: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log/slog is available (maybe not for the version we support for luno-go so you can log parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think using slog will defeat the purpose of this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the purpose only be able to collect all logs through searching "luno/streaming: Connection error:" on something like Kibana or is it to consolidate metrics?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was going to say we can keep pair, but don't know if it's that useful for this error? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The purpose is to collate the logs. The pair and key is not particularly useful.
@@ -151,8 +151,7 @@ func (c *Conn) manageForever() { | |||
|
|||
for { | |||
if err := c.connect(); err != nil { | |||
log.Printf("luno/streaming: Connection error key=%s pair=%s: %v", | |||
c.keyID, c.pair, err) | |||
log.Printf("luno/streaming: Connection error: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was going to say we can keep pair, but don't know if it's that useful for this error? 🤔
@ptrenwith is this still needed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
streaming/streaming.go:154
- Removing key and pair information might reduce diagnostic detail; please confirm that the consolidated log message still provides sufficient context for troubleshooting connection errors.
log.Printf("luno/streaming: Connection error: %v", err)
@CodeRabbit review |
✅ Actions performedReview triggered.
|
WalkthroughThe log message within the Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
streaming/streaming.go (1)
154-155
: Consider emitting market pair at debug level to aid correlationDropping
keyID
removes potential credential leakage – good move.
However, completely omittingpair
makes it trickier to correlate connection issues when the process is multiplexing several markets.
A middle-ground could be to logpair
under a lower verbosity (e.g.,log.Printf("luno/streaming DEBUG: %s connection error: %v", c.pair, err)
behind a build tag or a-v
flag).No change strictly required, but worth considering.
Consolidate logging.
Summary by CodeRabbit