prometheus_exporter 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6957162d157420b2b8fb6d2a4b9e08483ce846497fe6bb21f1695b0e70460dc8
4
- data.tar.gz: 9a74c21c97efad9ef3720df426d14a5e1d879eb34bebcafc625de8d45f3b232b
3
+ metadata.gz: f90837db285b202f06d0f7360fe0260435a51457361cfbe505e473b573367fc6
4
+ data.tar.gz: 9ab075f33187b5cc7563e1236572870d8ce98b421fec46d989b7b00d968ef241
5
5
  SHA512:
6
- metadata.gz: 695472a08f8f9ede18d6f0fdaa8722d2e4efb01b20bf23269d26afae580cb559da4f409bb3499da7a80dcd5d47e6156a6e8c7e54f01c770485212e21369fb61d
7
- data.tar.gz: af55f7e9d025a925f0add89a61628d236691df0a613d82d8c4e622fc9b83b7651187d9e78121113de872632459e95015772ed9af43a12b85ce4a1f820be9b7fc
6
+ metadata.gz: 3b34b7b622d684ea9b25f4e8b223cd69b11df7686834a72b0e7f899a1b90bc691194a6bf7695ac0778dd88dba860245981977c67f10b214a9b5f9dcfbf0f31c7
7
+ data.tar.gz: 2ecc3d186fa4de3bce308b87f5cab0b1c95f336efc72819e08e6cd1258f2b5ef5b381d8347d686e85eb1a18ac8890d4230479e3f9234889d0631ec4034beab2a
@@ -158,6 +158,7 @@ class PrometheusExporter::Client
158
158
  @socket = TCPSocket.new @host, @port
159
159
  @socket.write("POST /send-metrics HTTP/1.1\r\n")
160
160
  @socket.write("Transfer-Encoding: chunked\r\n")
161
+ @socket.write("Host: #{@host}\r\n")
161
162
  @socket.write("Connection: Close\r\n")
162
163
  @socket.write("Content-Type: application/octet-stream\r\n")
163
164
  @socket.write("\r\n")
@@ -23,19 +23,23 @@ module PrometheusExporter::Server
23
23
  @total_sessions.observe(0)
24
24
  @total_bad_metrics.observe(0)
25
25
 
26
- access_log = []
26
+ access_log, logger = nil
27
+
27
28
  if verbose
28
29
  access_log = [
29
30
  [$stderr, WEBrick::AccessLog::COMMON_LOG_FORMAT],
30
31
  [$stderr, WEBrick::AccessLog::REFERER_LOG_FORMAT],
31
32
  ]
32
33
  logger = WEBrick::Log.new($stderr)
34
+ else
35
+ access_log = []
36
+ logger = WEBrick::Log.new("/dev/null")
33
37
  end
34
38
 
35
39
  @server = WEBrick::HTTPServer.new(
36
40
  Port: port,
37
41
  Logger: logger,
38
- AccessLog: access_log
42
+ AccessLog: access_log,
39
43
  )
40
44
 
41
45
  @collector = collector || Collector.new
@@ -1,3 +1,3 @@
1
1
  module PrometheusExporter
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prometheus_exporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron