diff --git a/ceilometer/publisher/gnocchi.py b/ceilometer/publisher/gnocchi.py index 16872c33..5cfea378 100644 --- a/ceilometer/publisher/gnocchi.py +++ b/ceilometer/publisher/gnocchi.py @@ -123,8 +123,9 @@ def event_match(self, event_type): def sample_attributes(self, sample): attrs = {} + sample_dict = sample.as_dict() for name, definition in self._attributes.items(): - value = definition.parse(sample.as_dict()) + value = definition.parse(sample_dict) if value is not None: attrs[name] = value return attrs