[#375] Add log metrics #437
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#437
Loading…
Reference in a new issue
No description provided.
Delete branch "ale64bit/frostfs-node:feature/375-log-metrics"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Signed-off-by: Alejandro Lopez a.lopez@yadro.com
Closes #375
@ -0,0 +29,4 @@
}
}
func (m *logMetrics) Add(level zapcore.Level, dropped bool) {
I think
Inc
would be better becauseAdd
requires value to add i think.done, although I didn't mean it in the "Add a delta" sense, but in the "Add a log entry" sense.
@ -83,3 +88,4 @@
c.Level = lvl
c.Encoding = "console"
c.EncoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder
c.Sampling.Hook = func(e zapcore.Entry, sd zapcore.SamplingDecision) {
Will this
Hook
passed to nested loggers?I don't know. Which nested loggers?
For example here: https://git.frostfs.info/TrueCloudLab/frostfs-node/src/branch/master/pkg/local_object_storage/shard/id.go#L52
I see. Yeah, I just tried and it does propagate.
IMHO it would really strange if it didn't, from a user perspective. The hook is just a regular config option: why would it be skipped compared to other config options when calling
With
or cloning the logger?I don't know, i've just asked)
527cb9e480
to55f9181c68