Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
metrics: Return a copy of LabelFilter in WithEnabledLabels(nil)
LabelFilter.WithEnabledLabels behaved in the same way when passed nil or an empty slice - it disabled all labels. However, it's convenient to have a "no-op" option and just return a copy of the original filter. Let's do that when the passed slice is nil. This change doesn't affect users. Currently the method is always called with a non-nil slice. While here, I documented LabelFilter.WithEnabledLabels with edge cases. Signed-off-by: Anna Kapuscinska <[email protected]>
- Loading branch information