-
Notifications
You must be signed in to change notification settings - Fork 57
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
chore: log enhancement for message reliability analysis #2640
Conversation
You can find the image built from this PR at
Built from c1793ad |
You can find the image built from this PR at
Built from c1793ad |
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.
Uff amazing! This will help a lot!
Thanks so much 😍
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.
LGTM thank you for it.
waku/waku_filter_v2/protocol.nim
Outdated
hash = messagePush.pubsubTopic.computeMessageHash(messagePush.wakuMessage).to0xHex() | ||
target_peer_ids = peers.mapIt(shortLog(it)), | ||
msg_hash = | ||
messagePush.pubsubTopic.computeMessageHash(messagePush.wakuMessage).to0xHex() |
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.
It might be called twice per logging. There is a processing flow in chronicles that evaluates twice the message arguments. It is better as its in line 214 in this file.
waku/waku_filter_v2/protocol.nim
Outdated
@@ -228,16 +232,20 @@ proc handleMessage*( | |||
if not await wf.pushToPeers(subscribedPeers, messagePush).withTimeout( | |||
MessagePushTimeout | |||
): | |||
debug "timed out pushing message to peers", | |||
info "timed out pushing message to peers", |
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.
Isnt it an error? Or do we just want to notice this?
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.
Isnt it an error? Or do we just want to notice this?
ah yes good point! I will change it to error
I understand the request since Nwaku logs are unusable BUT this "fix" will make it worst, we need to improve the logs not accommodate specific readers. I disagree with this PR. We need clear guidelines and a concrete plan to improve the logs. Lets discuss this please! |
f8339db
to
ef32371
Compare
pubsubTopic = pubsubTopic, | ||
contentTopic = message.contentTopic, | ||
peer = peer.peerId | ||
target_peer_id = peer.peerId, | ||
msg_hash = pubsubTopic.computeMessageHash(message).to0xHex() | ||
return await node.wakuLightpushClient.publish(pubsubTopic, message, peer) | ||
|
||
if not node.wakuLightPush.isNil(): | ||
debug "publishing message with self hosted lightpush", |
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 this supposed to be debug
?
Because in the "publishing message with lightpush"
case, it is being logged at info
level.
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.
As per previous conversations we had in PM meeting, I will move back all info
to debug
The next modules are touched: - waku_node.nim - archive.nim - waku_filter_v2/protocol.nim - waku_lightpush/protocol.nim - waku_relay/protocol.nim
Co-authored-by: gabrielmer <101006718+gabrielmer@users.noreply.github.com>
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.
Few comments
waku/node/waku_node.nim
Outdated
@@ -914,7 +914,7 @@ proc mountLightPush*( | |||
|
|||
if publishedCount == 0: | |||
## Agreed change expected to the lightpush protocol to better handle such case. https://github.com/waku-org/pm/issues/93 | |||
debug "Lightpush request has not been published to any peers" | |||
info "Lightpush request has not been published to any peers" |
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.
Shouldn't we log the hash here? It would be hard to trace otherwise with many messages going in parallel.
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.
Thanks I will submit a change with that
waku/waku_archive/archive.nim
Outdated
|
||
let insertStartTime = getTime().toUnixFloat() | ||
|
||
(await self.driver.put(pubsubTopic, msg, msgDigest, msgHash, msgTimestamp)).isOkOr: | ||
waku_archive_errors.inc(labelValues = [insertFailure]) | ||
debug "failed to insert message", err = error | ||
|
||
info "message archived", |
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.
One suggestion i have is rather than making all these as info logs? Can we make it as part of compile flag or some config to log such messages for debugging/tracing? I remember Jakubs mentioning something similar being already there in nwaku which they enable in status fleets for tracing.
ef32371
to
679544d
Compare
@NagyZoltanPeter - for any unknown reason I couldn't change any single line of |
Hm... issue I had with MacOs tests I found in my PR and fixed. Nothing particular. But what change do you mean here? |
Sorry for late response. In the following PR it can be seen how the test fails on MacOS due to the changes in |
Description
The next modules are touched:
waku_lightpush/protocol.nimIssue
Add logging of hashes to all nodes - #2474