Skip to content
Draft
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -237,4 +237,4 @@ def get_label_normalizer(metric_type):
elif metric_type == 'summary':
return normalize_labels_summary
else:
return no_op
return None
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ def generate_sample_data(self, metric):
Yield a sample of processed data.
"""
label_normalizer = get_label_normalizer(metric.type)
populate = self.label_aggregator.populate if self.label_aggregator.configured else None

for sample in metric.samples:
value = sample.value
Expand All @@ -374,8 +375,10 @@ def generate_sample_data(self, metric):
tags = []
skip_sample = False
labels = sample.labels
self.label_aggregator.populate(labels)
label_normalizer(labels)
if populate is not None:
populate(labels)
if label_normalizer is not None:
label_normalizer(labels)

for label_name, label_value in labels.items():
sample_excluder = self.exclude_metrics_by_labels.get(label_name)
Expand Down
Loading