DEV: bump prometheus exporter version

DEV: bump prometheus exporter version

New version binds to localhost by default which is less exposed.

Additionally it adds a hostname helper

If we have trouble with binding to v6 we can adjust per: https://github.com/discourse/prometheus_exporter/commit/f83b4f4fb6e9285e3d8c8e7a1e96f6f3fcbba475

diff --git a/lib/internal_metric/global.rb b/lib/internal_metric/global.rb
index 034f1c6..0d6cf63 100644
--- a/lib/internal_metric/global.rb
+++ b/lib/internal_metric/global.rb
@@ -6,15 +6,6 @@ require 'sidekiq/api'
 module DiscoursePrometheus::InternalMetric
   class Global < Base
 
-    def self.hostname
-      @hostname ||=
-        begin
-          Discourse::Utils.execute_command("hostname").strip
-        rescue
-          "Unknown"
-        end
-    end
-
     STUCK_JOB_MINUTES = 60
 
     attribute :postgres_readonly_mode,
@@ -82,7 +73,7 @@ module DiscoursePrometheus::InternalMetric
 
       @sidekiq_processes = 0
       @sidekiq_workers = Sidekiq::ProcessSet.new.sum do |process|
-        if process["hostname"] == Global.hostname
+        if process["hostname"] == ::DiscoursePrometheus.hostname
           @sidekiq_processes += 1
           process["concurrency"]
         else
@@ -91,7 +82,7 @@ module DiscoursePrometheus::InternalMetric
       end
 
       @sidekiq_stuck_workers = Sidekiq::Workers.new.filter do |queue, _, w|
-        queue.start_with?(Global.hostname) && Time.at(w["run_at"]) < (Time.now - 60 * STUCK_JOB_MINUTES)
+        queue.start_with?(::DiscoursePrometheus.hostname) && Time.at(w["run_at"]) < (Time.now - 60 * STUCK_JOB_MINUTES)
       end.count
 
       @sidekiq_paused = sidekiq_paused_states
diff --git a/prometheus_exporter_version b/prometheus_exporter_version
index 5745cc7..8f0916f 100644
--- a/prometheus_exporter_version
+++ b/prometheus_exporter_version
@@ -1 +1 @@
-0.4.16
+0.5.0

GitHub sha: f11f9372