prometheus_exporter 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +4 -0
- data/README.md +5 -1
- data/lib/prometheus_exporter/client.rb +8 -1
- data/lib/prometheus_exporter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4855e62023cc91a24d7f604765a4c34c3cc652421e2f60d6041b8b87376dd74f
|
4
|
+
data.tar.gz: 9772f78ab97d6ae4218afefc353660f1c162df5c801aca60f326e0eeda1894c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e1450823b8b770a2538891a4315451e5be4dbe6bc3ffe77ba0b0081c6f436b5a2cfe189c4e4c77442bad72180f0ba6144c074378b55c266d5e6c33b4aa40f42
|
7
|
+
data.tar.gz: 62457c9bdfaedfc02acbdfd0e472790a4ba5b5c124778f8f58173fc0b98f442d7d23e71fd16345334fe71778e46096559e7c2ae32c94255f155abb0dc3a92619
|
data/CHANGELOG
CHANGED
data/README.md
CHANGED
@@ -24,6 +24,7 @@ To learn more see [Instrumenting Rails with Prometheus](https://samsaffron.com/a
|
|
24
24
|
* [GraphQL support](#graphql-support)
|
25
25
|
* [Metrics default prefix / labels](#metrics-default-prefix--labels)
|
26
26
|
* [Client default labels](#client-default-labels)
|
27
|
+
* [Client default host](#client-default-host)
|
27
28
|
* [Transport concerns](#transport-concerns)
|
28
29
|
* [JSON generation and parsing](#json-generation-and-parsing)
|
29
30
|
* [Contributing](#contributing)
|
@@ -195,7 +196,7 @@ This collects activerecord connection pool metrics.
|
|
195
196
|
|
196
197
|
It supports injection of custom labels and the connection config options (`username`, `database`, `host`, `port`) as labels.
|
197
198
|
|
198
|
-
For Puma single mode
|
199
|
+
For Puma single mode
|
199
200
|
```ruby
|
200
201
|
#in puma.rb
|
201
202
|
require 'prometheus_exporter/instrumentation'
|
@@ -560,6 +561,9 @@ Will result in:
|
|
560
561
|
http_requests_total{controller="home","action"="index",service="app-server-01",app_name="app-01"} 2
|
561
562
|
http_requests_total{service="app-server-01",app_name="app-01"} 1
|
562
563
|
```
|
564
|
+
### Client default host
|
565
|
+
|
566
|
+
By default, `PrometheusExporter::Client.default` connects to `localhost:9394`. If your setup requires this (e.g. when using `docker-compose`), you can change the default host and port by setting the environment variables `PROMETHEUS_EXPORTER_HOST` and `PROMETHEUS_EXPORTER_PORT`.
|
563
567
|
|
564
568
|
## Transport concerns
|
565
569
|
|
@@ -53,7 +53,14 @@ module PrometheusExporter
|
|
53
53
|
MAX_SOCKET_AGE = 25
|
54
54
|
MAX_QUEUE_SIZE = 10_000
|
55
55
|
|
56
|
-
def initialize(
|
56
|
+
def initialize(
|
57
|
+
host: ENV.fetch('PROMETHEUS_EXPORTER_HOST', 'localhost'),
|
58
|
+
port: ENV.fetch('PROMETHEUS_EXPORTER_PORT', PrometheusExporter::DEFAULT_PORT),
|
59
|
+
max_queue_size: nil,
|
60
|
+
thread_sleep: 0.5,
|
61
|
+
json_serializer: nil,
|
62
|
+
custom_labels: nil
|
63
|
+
)
|
57
64
|
@metrics = []
|
58
65
|
|
59
66
|
@queue = Queue.new
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prometheus_exporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|