Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions sdks/python/apache_beam/metrics/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,12 @@ class MetricResults(object):

@staticmethod
def _matches_name(filter, metric_key):
if not filter.names and not filter.namespaces:
return True

if ((filter.namespaces and metric_key.metric.namespace in filter.namespaces)
or (filter.names and metric_key.metric.name in filter.names)):
if ((filter.namespaces and
metric_key.metric.namespace not in filter.namespaces) or
(filter.names and metric_key.metric.name not in filter.names)):
return False
else:
return True
return False

@staticmethod
def _is_sub_list(needle, haystack):
Expand Down