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

Conversation

ptrenwith
Copy link

Consolidate logging.

@@ -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.

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

@andrewwormald
Copy link

@ptrenwith is this still needed?

@echarrod echarrod requested a review from Copilot April 11, 2025 13:40
Copy link

@Copilot Copilot AI left a 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)

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.

4 participants