Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions streaming/streaming.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

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.

Copy link
Contributor

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.

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?

Copy link
Contributor

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? 🤔

Copy link
Author

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.

}
if c.IsClosed() {
return
Expand Down