nordinh: added MeasurementUnit for sampling and sending to collector,
Serializer for json serialization of events