File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change 9
9
"sync"
10
10
11
11
"github.com/go-kit/log"
12
- "github.com/go-kit/log/level"
13
12
"github.com/grafana/dskit/httpgrpc"
14
13
"github.com/grafana/dskit/multierror"
15
14
"github.com/grafana/dskit/ring"
@@ -264,20 +263,11 @@ func (i *instance) Observe(stream string, entries []logproto.Entry) {
264
263
streamMetrics , ok := i .aggMetricsByStreamAndLevel [stream ]
265
264
266
265
if ! ok {
267
- streamMetrics = make (map [string ]* aggregatedMetrics , len (constants .LogLevels ))
268
- for _ , l := range constants .LogLevels {
269
- streamMetrics [l ] = & aggregatedMetrics {}
270
- }
266
+ streamMetrics = map [string ]* aggregatedMetrics {}
271
267
}
272
268
273
269
if _ , ok := streamMetrics [lvl ]; ! ok {
274
- level .Warn (i .logger ).Log (
275
- "msg" , "unknown log level while observing stream" ,
276
- "level" , lvl ,
277
- "stream" , stream ,
278
- )
279
-
280
- lvl = constants .LogLevelUnknown
270
+ streamMetrics [lvl ] = & aggregatedMetrics {}
281
271
}
282
272
283
273
streamMetrics [lvl ].bytes += uint64 (len (entry .Line ))
You can’t perform that action at this time.
0 commit comments