def add_sample(self,
                   metricId,
                   timestamp,
                   value,
                   metricType=None,
                   host=None,
                   sparseDataStrategy='None',
                   unit='',
                   tags=None,
                   min=None,
                   max=None,
                   avg=None,
                   sum=None,
                   cnt=None,
                   ts_is_ms=False):
        """
            :param metricId: Metric FQN
            :type metricId: string
            :param timestamp: Timestamp for the sample
            :type timestamp: int
            :param value: Value of the sample
            :type value: float
            :param metricType: Metric Type
            :type metricType: string
            :param host: Element FQN
            :type host: string
            :param sparseDataStrategy: Sparse data strategy
            :type sparseDataStrategy: string
            :param unit: Metric Unit type
            :type unit: string
            :param tags: List of dicts
            :type tags: list
            :param min: Minimum of the sample
            :type min: float
            :param max: Maximum of the sample
            :type max: float
            :param avg: Average of the sample
            :type avg: float
            :param sum: Sum of the sample
            :type sum: float
            :param cnt: Count of the sample
            :type cnt: float
            :param ts_is_ms: Is the timestamp in milliseconds
            :type ts_is_ms: bool



        """

        if self.id is None and host is not None:
            self.id = host

        if self.name is None and host is not None:
            self.name = host

        if tags is not None:
            Tags = []
            for i in tags:
                for k in i:
                    Tags.append(Tag(k, i[k]))

        else:
            Tags = None

        metricIdSan = self._sanitize(metricId)

        if not hasattr(self, "_metrics"):
            setattr(self, "_metrics", {})

        if self._metrics.get(metricIdSan) is None:
            self._metrics[metricIdSan] = Metric(metricIdSan,
                                                metricType,
                                                sparseDataStrategy,
                                                unit,
                                                Tags)

        if timestamp is None:
            ts = to_ms_timestamp_int(datetime.datetime.utcnow())

        else:
            if ts_is_ms:
                ts = int(timestamp)
            else:
                ts = int(timestamp * 1000)

        self.samples.append(Sample(metricIdSan,
                                   ts,
                                   value,
                                   min,
                                   max,
                                   avg,
                                   sum,
                                   cnt))