spark_plugin.py
def emit(self, metric_record):
        """
        Construct a single collectd Values instance from the given MetricRecord
        and dispatch.
        """
        emit_value = collectd.Values()
        emit_value.plugin = PLUGIN_NAME
        emit_value.values = [metric_record.value]
        emit_value.type = metric_record.type
        emit_value.type_instance = metric_record.name
        emit_value.plugin_instance = "[{0}]".format(self._format_dimensions(metric_record.dimensions))

        # With some versions of CollectD, a dummy metadata map must to be added
        # to each value for it to be correctly serialized to JSON by the
        # write_http plugin. See
        # https://github.com/collectd/collectd/issues/716
        emit_value.meta = {"true": "true"}

        emit_value.dispatch()

        Construct a single collectd Values instance from the given MetricRecord
        and dispatch.
        
Construct a single collectd Values instance from the given MetricRecord
and dispatch.
Construct a single collectd Values instance from the given MetricRecord and dispatch .
def emit(self, metric_record):
        emit_value = collectd.Values()
        emit_value.plugin = PLUGIN_NAME
        emit_value.values = [metric_record.value]
        emit_value.type = metric_record.type
        emit_value.type_instance = metric_record.name
        emit_value.plugin_instance = "[{0}]".format(self._format_dimensions(metric_record.dimensions))
        emit_value.meta = {"true": "true"}
        emit_value.dispatch()
def emit ( self , metric_record ) : emit_value = collectd . Values ( ) emit_value . plugin = PLUGIN_NAME emit_value . values = [ metric_record . value ] emit_value . type = metric_record . type emit_value . type_instance = metric_record . name emit_value . plugin_instance = "[{0}]" . format ( self . _format_dimensions ( metric_record . dimensions ) ) emit_value . meta = { "true" : "true" } emit_value . dispatch ( )
Construct a single collectd Values instance from the given MetricRecord
and dispatch.
Construct a single collectd Values instance from the given MetricRecord and dispatch .
"""
        Construct a single collectd Values instance from the given MetricRecord
        and dispatch.
        """ # With some versions of CollectD, a dummy metadata map must to be added # to each value for it to be correctly serialized to JSON by the # write_http plugin. See # https://github.com/collectd/collectd/issues/716
self
metric_record