diff --git a/octoprint_prometheus_exporter/__init__.py b/octoprint_prometheus_exporter/__init__.py index 0d956ad..c8e41db 100644 --- a/octoprint_prometheus_exporter/__init__.py +++ b/octoprint_prometheus_exporter/__init__.py @@ -225,11 +225,9 @@ def gcodephase_hook(self, comm_instance, phase, cmd, cmd_type, gcode, subcode=No if phase == "sent": parse_result = self.parser.process_line(cmd) if parse_result == "movement": - # extrusion_print is modeled as a gauge so we can reset it after every print - self.extrusion_print.set(self.parser.extrusion_counter) - if self.parser.extrusion_counter > self.last_extrusion_counter: # extrusion_total is monotonically increasing for the lifetime of the plugin + self.extrusion_print.inc(self.parser.extrusion_counter - self.last_extrusion_counter) self.extrusion_total.inc(self.parser.extrusion_counter - self.last_extrusion_counter) self.last_extrusion_counter = self.parser.extrusion_counter diff --git a/setup.py b/setup.py index ac4f442..b8fe3d4 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ plugin_name = "OctoPrint-Prometheus-Exporter" # The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module -plugin_version = "0.1.6" +plugin_version = "0.1.7" # The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin # module