| 1 | // Copyright (c) 2016-2022 Uber Technologies, Inc. |
| 2 | // |
| 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy |
| 4 | // of this software and associated documentation files (the "Software"), to deal |
| 5 | // in the Software without restriction, including without limitation the rights |
| 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 7 | // copies of the Software, and to permit persons to whom the Software is |
| 8 | // furnished to do so, subject to the following conditions: |
| 9 | // |
| 10 | // The above copyright notice and this permission notice shall be included in |
| 11 | // all copies or substantial portions of the Software. |
| 12 | // |
| 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 19 | // THE SOFTWARE. |
| 20 | |
| 21 | package zapcorescip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/ |
| 22 | |
| 23 | import ( |
| 24 | "sync/atomicscip-go gomod github.com/golang/go/src go1.19 `sync/atomic`/" |
| 25 | "timescip-go gomod github.com/golang/go/src go1.19 time/" |
| 26 | ) |
| 27 | |
| 28 | const ( |
| 29 | _numLevelsscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/_numLevels. = _maxLevelscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/_maxLevel. - _minLevelscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/_minLevel. + 1 |
| 30 | _countersPerLevelscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/_countersPerLevel. = 4096 |
| 31 | ) |
| 32 | |
| 33 | type counterscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/counter# struct { |
| 34 | resetAtscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/counter#resetAt. atomicscip-go gomod github.com/golang/go/src go1.19 `sync/atomic`/.Int64scip-go gomod github.com/golang/go/src go1.19 `sync/atomic`/Int64# |
| 35 | counterscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/counter#counter. atomicscip-go gomod github.com/golang/go/src go1.19 `sync/atomic`/.Uint64scip-go gomod github.com/golang/go/src go1.19 `sync/atomic`/Uint64# |
| 36 | } |
| 37 | |
| 38 | type countersscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/counters# [_numLevelsscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/_numLevels.][_countersPerLevelscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/_countersPerLevel.]counterscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/counter# |
| 39 | |
| 40 | func newCountersscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/newCounters().() *countersscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/counters# { |
| 41 | return &countersscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/counters#{} |
| 42 | } |
| 43 | |
| 44 | func (cs *countersscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/counters#) getscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/counters#get().(lvl Levelscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/Level#, key string) *counterscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/counter# { |
| 45 | i := lvl - _minLevelscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/_minLevel. |
| 46 | j := fnv32ascip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/fnv32a().(key) % _countersPerLevelscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/_countersPerLevel. |
| 47 | return &cs[i][j] |
| 48 | } |
| 49 | |
| 50 | // fnv32a, adapted from "hash/fnv", but without a []byte(string) alloc |
| 51 | func fnv32ascip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/fnv32a().(s string) uint32 { |
| 52 | const ( |
| 53 | offset32 = 2166136261 |
| 54 | prime32 = 16777619 |
| 55 | ) |
| 56 | hash := uint32(offset32) |
| 57 | for i := 0; i < len(s); i++ { |
| 58 | hash ^= uint32(s[i]) |
| 59 | hash *= prime32 |
| 60 | } |
| 61 | return hash |
| 62 | } |
| 63 | |
| 64 | func (c *counterscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/counter#) IncCheckResetscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/counter#IncCheckReset().(t timescip-go gomod github.com/golang/go/src go1.19 time/.Timescip-go gomod github.com/golang/go/src go1.19 time/Time#, tick timescip-go gomod github.com/golang/go/src go1.19 time/.Durationscip-go gomod github.com/golang/go/src go1.19 time/Duration#) uint64 { |
| 65 | tn := t.UnixNanoscip-go gomod github.com/golang/go/src go1.19 time/Time#UnixNano().() |
| 66 | resetAfter := c.resetAtscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/counter#resetAt..Loadscip-go gomod github.com/golang/go/src go1.19 `sync/atomic`/Int64#Load().() |
| 67 | if resetAfter > tn { |
| 68 | return c.counterscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/counter#counter..Addscip-go gomod github.com/golang/go/src go1.19 `sync/atomic`/Uint64#Add().(1) |
| 69 | } |
| 70 | |
| 71 | c.counterscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/counter#counter..Storescip-go gomod github.com/golang/go/src go1.19 `sync/atomic`/Uint64#Store().(1) |
| 72 | |
| 73 | newResetAfter := tn + tick.Nanosecondsscip-go gomod github.com/golang/go/src go1.19 time/Duration#Nanoseconds().() |
| 74 | if !c.resetAtscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/counter#resetAt..CompareAndSwapscip-go gomod github.com/golang/go/src go1.19 `sync/atomic`/Int64#CompareAndSwap().(resetAfter, newResetAfter) { |
| 75 | // We raced with another goroutine trying to reset, and it also reset |
| 76 | // the counter to 1, so we need to reincrement the counter. |
| 77 | return c.counterscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/counter#counter..Addscip-go gomod github.com/golang/go/src go1.19 `sync/atomic`/Uint64#Add().(1) |
| 78 | } |
| 79 | |
| 80 | return 1 |
| 81 | } |
| 82 | |
| 83 | // SamplingDecision is a decision represented as a bit field made by sampler. |
| 84 | // More decisions may be added in the future. |
| 85 | type SamplingDecisionscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/SamplingDecision# uint32 |
| 86 | |
| 87 | const ( |
| 88 | // LogDropped indicates that the Sampler dropped a log entry. |
| 89 | LogDroppedscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/LogDropped. SamplingDecisionscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/SamplingDecision# = 1 << iota |
| 90 | // LogSampled indicates that the Sampler sampled a log entry. |
| 91 | LogSampledscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/LogSampled. |
| 92 | ) |
| 93 | |
| 94 | // optionFunc wraps a func so it satisfies the SamplerOption interface. |
| 95 | type optionFuncscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/optionFunc# func(*samplerscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#) |
| 96 | |
| 97 | func (f optionFuncscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/optionFunc#) applyscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/optionFunc#apply().(s *samplerscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#) { |
| 98 | f(s) |
| 99 | } |
| 100 | |
| 101 | // SamplerOption configures a Sampler. |
| 102 | type SamplerOptionscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/SamplerOption# interface { |
| 103 | applyscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/SamplerOption#apply.(*samplerscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#) |
| 104 | } |
| 105 | |
| 106 | // nopSamplingHook is the default hook used by sampler. |
| 107 | func nopSamplingHookscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/nopSamplingHook().(Entryscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/Entry#, SamplingDecisionscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/SamplingDecision#) {} |
| 108 | |
| 109 | // SamplerHook registers a function which will be called when Sampler makes a |
| 110 | // decision. |
| 111 | // |
| 112 | // This hook may be used to get visibility into the performance of the sampler. |
| 113 | // For example, use it to track metrics of dropped versus sampled logs. |
| 114 | // |
| 115 | // var dropped atomic.Int64 |
| 116 | // zapcore.SamplerHook(func(ent zapcore.Entry, dec zapcore.SamplingDecision) { |
| 117 | // if dec&zapcore.LogDropped > 0 { |
| 118 | // dropped.Inc() |
| 119 | // } |
| 120 | // }) |
| 121 | func SamplerHookscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/SamplerHook().(hook func(entry Entryscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/Entry#, dec SamplingDecisionscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/SamplingDecision#)) SamplerOptionscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/SamplerOption# { |
| 122 | return optionFuncscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/optionFunc#(func(s *samplerscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#) { |
| 123 | s.hookscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#hook. = hook |
| 124 | }) |
| 125 | } |
| 126 | |
| 127 | // NewSamplerWithOptions creates a Core that samples incoming entries, which |
| 128 | // caps the CPU and I/O load of logging while attempting to preserve a |
| 129 | // representative subset of your logs. |
| 130 | // |
| 131 | // Zap samples by logging the first N entries with a given level and message |
| 132 | // each tick. If more Entries with the same level and message are seen during |
| 133 | // the same interval, every Mth message is logged and the rest are dropped. |
| 134 | // |
| 135 | // For example, |
| 136 | // |
| 137 | // core = NewSamplerWithOptions(core, time.Second, 10, 5) |
| 138 | // |
| 139 | // This will log the first 10 log entries with the same level and message |
| 140 | // in a one second interval as-is. Following that, it will allow through |
| 141 | // every 5th log entry with the same level and message in that interval. |
| 142 | // |
| 143 | // If thereafter is zero, the Core will drop all log entries after the first N |
| 144 | // in that interval. |
| 145 | // |
| 146 | // Sampler can be configured to report sampling decisions with the SamplerHook |
| 147 | // option. |
| 148 | // |
| 149 | // Keep in mind that Zap's sampling implementation is optimized for speed over |
| 150 | // absolute precision; under load, each tick may be slightly over- or |
| 151 | // under-sampled. |
| 152 | func NewSamplerWithOptionsscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/NewSamplerWithOptions().(core Corescip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/Core#, tick timescip-go gomod github.com/golang/go/src go1.19 time/.Durationscip-go gomod github.com/golang/go/src go1.19 time/Duration#, first, thereafter int, opts ...SamplerOptionscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/SamplerOption#) Corescip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/Core# { |
| 153 | s := &samplerscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#{ |
| 154 | Corescip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#Core.: core, |
| 155 | tickscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#tick.: tick, |
| 156 | countsscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#counts.: newCountersscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/newCounters().(), |
| 157 | firstscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#first.: uint64(first), |
| 158 | thereafterscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#thereafter.: uint64(thereafter), |
| 159 | hookscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#hook.: nopSamplingHookscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/nopSamplingHook()., |
| 160 | } |
| 161 | for _, opt := range opts { |
| 162 | opt.applyscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/SamplerOption#apply.(s) |
| 163 | } |
| 164 | |
| 165 | return s |
| 166 | } |
| 167 | |
| 168 | type samplerscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler# struct { |
| 169 | Corescip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#Core. |
| 170 | |
| 171 | countsscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#counts. *countersscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/counters# |
| 172 | tickscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#tick. timescip-go gomod github.com/golang/go/src go1.19 time/.Durationscip-go gomod github.com/golang/go/src go1.19 time/Duration# |
| 173 | firstscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#first., thereafterscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#thereafter. uint64 |
| 174 | hookscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#hook. func(Entryscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/Entry#, SamplingDecisionscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/SamplingDecision#) |
| 175 | } |
| 176 | |
| 177 | var ( |
| 178 | _ Corescip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/Core# = (*samplerscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#)(nil) |
| 179 | _ leveledEnablerscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/leveledEnabler# = (*samplerscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#)(nil) |
| 180 | ) |
| 181 | |
| 182 | // NewSampler creates a Core that samples incoming entries, which |
| 183 | // caps the CPU and I/O load of logging while attempting to preserve a |
| 184 | // representative subset of your logs. |
| 185 | // |
| 186 | // Zap samples by logging the first N entries with a given level and message |
| 187 | // each tick. If more Entries with the same level and message are seen during |
| 188 | // the same interval, every Mth message is logged and the rest are dropped. |
| 189 | // |
| 190 | // Keep in mind that zap's sampling implementation is optimized for speed over |
| 191 | // absolute precision; under load, each tick may be slightly over- or |
| 192 | // under-sampled. |
| 193 | // |
| 194 | // Deprecated: use NewSamplerWithOptions. |
| 195 | func NewSamplerscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/NewSampler().(core Corescip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/Core#, tick timescip-go gomod github.com/golang/go/src go1.19 time/.Durationscip-go gomod github.com/golang/go/src go1.19 time/Duration#, first, thereafter int) Corescip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/Core# { |
| 196 | return NewSamplerWithOptionsscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/NewSamplerWithOptions().(core, tick, first, thereafter) |
| 197 | } |
| 198 | |
| 199 | func (s *samplerscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#) Levelscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#Level().() Levelscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/Level# { |
| 200 | return LevelOfscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/LevelOf().(s.Corescip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#Core.) |
| 201 | } |
| 202 | |
| 203 | func (s *samplerscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#) Withscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#With().(fields []Fieldscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/Field#) Corescip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/Core# { |
| 204 | return &samplerscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#{ |
| 205 | Corescip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#Core.: s.Corescip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#Core..Withscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/Core#With.(fields), |
| 206 | tickscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#tick.: s.tickscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#tick., |
| 207 | countsscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#counts.: s.countsscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#counts., |
| 208 | firstscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#first.: s.firstscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#first., |
| 209 | thereafterscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#thereafter.: s.thereafterscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#thereafter., |
| 210 | hookscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#hook.: s.hookscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#hook., |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | func (s *samplerscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#) Checkscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#Check().(ent Entryscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/Entry#, ce *CheckedEntryscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/CheckedEntry#) *CheckedEntryscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/CheckedEntry# { |
| 215 | if !s.Enabledscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/LevelEnabler#Enabled.(ent.Levelscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/Entry#Level.) { |
| 216 | return ce |
| 217 | } |
| 218 | |
| 219 | if ent.Levelscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/Entry#Level. >= _minLevelscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/_minLevel. && ent.Levelscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/Entry#Level. <= _maxLevelscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/_maxLevel. { |
| 220 | counter := s.countsscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#counts..getscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/counters#get().(ent.Levelscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/Entry#Level., ent.Messagescip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/Entry#Message.) |
| 221 | n := counter.IncCheckResetscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/counter#IncCheckReset().(ent.Timescip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/Entry#Time., s.tickscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#tick.) |
| 222 | if n > s.firstscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#first. && (s.thereafterscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#thereafter. == 0 || (n-s.firstscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#first.)%s.thereafterscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#thereafter. != 0) { |
| 223 | s.hookscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#hook.(ent, LogDroppedscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/LogDropped.) |
| 224 | return ce |
| 225 | } |
| 226 | s.hookscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#hook.(ent, LogSampledscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/LogSampled.) |
| 227 | } |
| 228 | return s.Corescip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/sampler#Core..Checkscip-go gomod go.uber.org/zap . `go.uber.org/zap/zapcore`/Core#Check.(ent, ce) |
| 229 | } |