[#502] Add Dropped logs (by sampling) metric #557
No reviewers
Labels
No labels
P0
P1
P2
P3
good first issue
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-s3-gw#557
Loading…
Reference in a new issue
No description provided.
Delete branch "pogpp/frostfs-s3-gw:feature/502_sampling_metric"
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?
close #502
Signed-off-by: Pavel Pogodaev p.pogodaev@yadro.com
80afebff7a
tob5eb8d185d
@ -43,2 +43,4 @@
}
func (m *AppMetrics) DroppedLogsInc() {
m.gate.Logs.DroppedLogsInc()
Please, use approach as for
UsersAPIStats
orAPIStatMetrics
orStateMetrics
Now it's similar to
StateMetrics
I'm not sure if this
func (m *AppMetrics) DroppedLogsInc() {
m.gate.Logs.DroppedLogsInc()
}
is similar to
func (m *AppMetrics) State() *StateMetrics {
if !m.isEnabled() {
return nil
}
return m.gate.State
}
b5eb8d185d
to26e5be8918
26e5be8918
to99ff86a0d1
@ -524,2 +525,4 @@
}
func (a *App) initLogger() {
coreWithContext := applyZapCoreMiddlewares(a.log.Core(), a.cfg, a.metrics)
I don't understand why do we applying new actually the same middleware that already has been added here
func samplingEnabling(v *viper.Viper, core zapcore.Core) zapcore.Core {
Init sequence of logger and metrics was sub-optimal, fixed
@ -93,6 +93,13 @@ var appMetricsDesc = map[string]map[string]Description{
},
},
statisticSubsystem: {
droppedLogs: Description{
I would suggest (if we use
statistic
subsystem) add new metric toAPIStatMetrics
#557 (comment)
99ff86a0d1
toe58ac06cc4
e58ac06cc4
toe38442675e
e38442675e
toe1595e385b
Please consider something like:
@ -1132,4 +1133,3 @@
consoleOutCore := zapcore.NewCore(newLogEncoder(), stdout, level)
consoleOutCore = samplingEnabling(v, consoleOutCore)
Now sampling doen't work at all.
See:
config:
and the following request:
leads to logging all 10 message
tested this way
It turns out this isn't correct way of testing in this case
e1595e385b
to724e6b601e
724e6b601e
todccf3c1d07
dccf3c1d07
to51322cccdf