g5_prom_rails 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: 9b989ca4a0078f71ac841968d0856eee42d502b3
4
- data.tar.gz: f3b202a9f269331b49a22451115929e456ba5dff
3
+ metadata.gz: 9c6e031d0ef9823a61f5386165611a853b304524
4
+ data.tar.gz: 974794f7fa54e9d128741ddeb80479e07c669add
5
5
  SHA512:
6
- metadata.gz: 45635669ba0ee1ec30a31c16103e2bd8363ea088405cb8e91e4811c6ee14d717c148324412d76c2bcdb947da9c9f8745966bd277b83eccfe462b890cfe8f91f8
7
- data.tar.gz: 8f07da93804aa4cb94cde9f4317e041e9a70ef435135c2a753211c44e705c9f4433afc8aec88c58405262810f29a33bf50272998252379516cbe9000388cbcd1
6
+ metadata.gz: 6485f9691c48d7e427e9f99bd4597e0b6238e6e45cd574ec7ed1e716b492166802cb00fcc7240da3f92bb4f4410d1af74e2dc252e4fa76c77e615567c11c1bc3
7
+ data.tar.gz: f0f2bb00fe6c3df231e3c3d92d9b316838e3206c1b499ffb05f36095d0a1736ad1fd18f56d2a22c2d52087354a313111bb6c5181ca81af64aaa61305ef4b4e25
data/README.md CHANGED
@@ -33,7 +33,7 @@ G5PromRails.initialize_per_application = -> (registry) {
33
33
  METRICS.initialize_per_application(registry)
34
34
  }
35
35
 
36
- G5PromRails.initialize_per_application = -> (registry) {
36
+ G5PromRails.initialize_per_process = -> (registry) {
37
37
  METRICS.initialize_per_process(registry)
38
38
  }
39
39
 
@@ -92,7 +92,7 @@ There are a couple of general Prometheus tips things to keep in mind.
92
92
  As you will soon learn, G5PromRails can provide you with some automatic metrics. Most of them are scoped to your application's name. It will attempt to infer the application's name from the Rails Application class's (`config/application.rb`) dasherized parent module name. If that doesn't work for you, it can be manually defined with:
93
93
 
94
94
  ```ruby
95
- G5PromRails.app_name = "my_app_name"
95
+ G5PromRails.app_name = "my-app-name"
96
96
  ```
97
97
 
98
98
  ## Sidekiq
@@ -126,12 +126,12 @@ There are some common instrumentation tasks that this gem can help you with.
126
126
  When you'd like to instrument the count of certain ActiveRecord models, in an initializer you can:
127
127
 
128
128
  ```ruby
129
- G5PromRails.count_models(:my_app, Post, Comment)
129
+ G5PromRails.count_models(Post, Comment)
130
130
  ```
131
131
 
132
132
  Will result in a gauge metric named `model_rows` with a `model` label set to the tableized name of your model and an `app` label set to the `my_app`. In PromQL this will look like:
133
133
  ```promql
134
- model_rows{model="posts", app="my_app"}
134
+ model_rows{model="posts", app="my-app"}
135
135
  ```
136
136
 
137
137
  This metric is left un-namespaced because it gives you the ability to compare these values across applications, while still allowing them to be limited to a single app via PromQL. The values will automatically be refreshed when the application-level metrics endpoint is hit.
@@ -1,5 +1,3 @@
1
- require "g5_prom_rails/engine"
2
-
3
1
  module G5PromRails
4
2
  PER_PROCESS_PATH = "/metrics"
5
3
  PER_APPLICATION_PATH = "/probe"
@@ -24,3 +22,8 @@ module G5PromRails
24
22
  end
25
23
  end
26
24
  end
25
+
26
+ # Down here due to fun behavior in implementing apps where G5PromRails module
27
+ # isn't defined if a class is defined straight up as G5PromRails::Whatever.
28
+ # Just scripting things.
29
+ require "g5_prom_rails/engine"
@@ -1,3 +1,3 @@
1
1
  module G5PromRails
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: g5_prom_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Don Petersen