def print_sample(self, metric_name, metric_value, type_value=None):
        """Record the specified metric.

        @param metric_name: The name of the metric.  It should only contain alphanumeric characters,
            periods, underscores.
        @param metric_value: The value of the metric.
        @param type_value: The type of the value.  This is emitted as an extra field for the metric.
            This is often used to label different types of some resource, such as CPU (user CPU vs. system CPU), etc.

        @type metric_name: str
        @type metric_value: float
        @type type_value: str
        """
        # For backward compatibility, we also publish the monitor id as 'app' in all reported stats.  The old
        # Java agent did this and it is important to some dashboards.
        extra = {
            'app': self._id,
        }
        if type_value is not None:
            extra['type'] = type_value

        self._logger.emit_value(metric_name, metric_value, extra)
dataset/ETHPy150Open scalyr/scalyr-agent-2/scalyr_agent/builtin_monitors/linux_process_metrics.py/BaseReader.print_sample/original