def add_to_snapshot(self,metric_line,ts = None):
        if ts is None:
            self._current_snapshot.append(metric_line)
        else:
            self._check_current_snapshot(ts)
            self._current_ts = ts
            self._current_snapshot.append(metric_line)
2 modes:
dataset/ETHPy150Open serverdensity/sd-agent/resources/__init__.py/ResourcePlugin.add_to_snapshot