Skip to content

Commit

Permalink
Add a noop filter to default view
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlias committed Jan 17, 2023
1 parent 44d1b97 commit af45187
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sdk/metric/meter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,8 @@ func TestAsynchronousExample(t *testing.T) {
selector := func(InstrumentKind) metricdata.Temporality { return temp }
reader := NewManualReader(WithTemporalitySelector(selector))

noFiltered := NewView(Instrument{Name: instName}, Stream{Name: instName})
noopFilter := func(kv attribute.KeyValue) bool { return true }
noFiltered := NewView(Instrument{Name: instName}, Stream{Name: instName, AttributeFilter: noopFilter})

filter := func(kv attribute.KeyValue) bool { return kv.Key != "tid" }
filtered := NewView(Instrument{Name: instName}, Stream{Name: filteredStream, AttributeFilter: filter})
Expand Down

0 comments on commit af45187

Please sign in to comment.