(self)
Overrides the Collector.collect method
Overrides the Collector.collect method
Overrides the Collector . collect method
def collect(self):
        """
        Overrides the Collector.collect method
        """

        # Set Metric Name
        metric_name = "my.example.metric"
        # Set Metric Value
        metric_value = 42

        # Publish Metric
        self.publish(metric_name, metric_value)
def collect ( self ) : # Set Metric Name metric_name = "my.example.metric" # Set Metric Value metric_value = 42 # Publish Metric self . publish ( metric_name , metric_value )