lib/prometheus/client/push.rb in prometheus-client-0.4.1 vs lib/prometheus/client/push.rb in prometheus-client-0.4.2
- old
+ new
@@ -18,12 +18,13 @@
HEADER = { 'Content-Type' => Formats::Text::CONTENT_TYPE }
attr_reader :job, :instance, :gateway, :path
def initialize(job, instance = nil, gateway = nil)
- @job, @instance, @gateway = job, instance, gateway || DEFAULT_GATEWAY
-
- @uri = parse(@gateway)
+ @job = job
+ @instance = instance
+ @gateway = gateway || DEFAULT_GATEWAY
+ @uri = parse(@gateway)
@path = build_path(job, instance)
@http = Net::HTTP.new(@uri.host, @uri.port)
end
def add(registry)