Disable log sampling by default #1675

Open
opened 2025-03-13 08:24:56 +00:00 by fyrchik · 0 comments
Owner

Console logger uses zap's production config: 6d482535bd/config.go (L161) . Production config defines, that zap will log only first 100 log entries for each level for 1 second. If there are more than 100 log entries in 1 second for level, then zap will log only 100-th log entries. For example, if there are 300 log entries for level warning, then only 0...99, 100, 200, 300 log entries will be logged.
Sampling hook only notifies if log entry was sampled or dropped.

Originally posted by @dstepanov-yadro in #1674 (comment)

Losing logs should not be the default behaviour.

Console logger uses `zap`'s production config: https://github.com/uber-go/zap/blob/6d482535bdd97f4d97b2f9573ac308f1cf9b574e/config.go#L161 . Production config defines, that zap will log only first 100 log entries for each level for 1 second. If there are more than 100 log entries in 1 second for level, then zap will log only 100-th log entries. For example, if there are 300 log entries for level `warning`, then only 0...99, 100, 200, 300 log entries will be logged. Sampling hook only notifies if log entry was sampled or dropped. _Originally posted by @dstepanov-yadro in https://git.frostfs.info/TrueCloudLab/frostfs-node/pulls/1674#issuecomment-70181_ Losing logs should not be the default behaviour.
fyrchik added the
discussion
frostfs-ir
frostfs-node
observability
labels 2025-03-13 08:25:45 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1675
No description provided.