mettric 0.1.12 → 0.1.13

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: 555d7e8f5825dd4b4d33cdf1007a869854bab852
4
- data.tar.gz: 6014b23f15ad3bbf4134fba45b2de25da778e57c
3
+ metadata.gz: 08cdfaf00799db2eafb16139724b95f0b0b9fed6
4
+ data.tar.gz: 8c1c7e145b57ddfd9f79df0720b7cd8a7ed4e5a8
5
5
  SHA512:
6
- metadata.gz: 0894d38c1412cdf571be55852bb3b61099805da54a8467803e5f6353a69e0445140a7925f4dabd0d91d5863aec1b5ff285147c875dcecb638c055f969e79701e
7
- data.tar.gz: 63bf7b956aa464f4fa9e1a53eeb9fea1c89c37bce02fd8a5a3d465106a97b6af5727bbbe3115a29d7d8f024937692d964b9050e9e35d65372a4823857c3be21e
6
+ metadata.gz: 746ead2be6615e86d659e89928a41b826e5d6d1e14b50637e46a5e693c8134c38e407f6b392999ea61444f80440d4651ec84b287df09b2f36e12053f22f7d762
7
+ data.tar.gz: 3ac48229d7ecc2aedd0f637d5d37289e5fc6a1f8b85812194000a5ef567ac4119630eabf344586db349d28b5fba37a58a31a4169dfa228ba81571bf9dea1568b
data/README.md CHANGED
@@ -15,7 +15,14 @@ Mettric.config = {
15
15
  }
16
16
  ```
17
17
 
18
- ## Track metrics
18
+ ## Track events
19
+
20
+ ```ruby
21
+ # Tracks payload with metric=1 and tags it 'event'
22
+ 🛎 service: 'User created'
23
+ ```
24
+
25
+ ## Track meter readings
19
26
 
20
27
  ```ruby
21
28
  🌡 service: 'Rails req/s', metric: 400, state: 'normal'
@@ -25,7 +32,8 @@ Mettric.config = {
25
32
 
26
33
  ```ruby
27
34
  # This will track the duration in milliseconds as the `metric` value
28
- (service: 'Duration of sleeping 1 sec') do
35
+ # as "Sleep duration ms" (note the added ' ms') and tag it 'timing'
36
+ ⏱ (service: 'Sleep duration') do
29
37
  sleep 1
30
38
  end
31
39
  ```
@@ -72,7 +72,7 @@ class Mettric::Client
72
72
  out = stringify(payload)
73
73
  raise Mettric::MissingService, out if out[:service].blank?
74
74
 
75
- out[:tags] = [out[:tags], :mettric].flatten.compact.uniq
75
+ out[:tags] = [out[:tags], :mettric].flatten.compact.uniq.map(&:to_s)
76
76
  out[:tags] << env if env.present?
77
77
  out[:metric] ||= 1
78
78
 
@@ -1,3 +1,3 @@
1
1
  class Mettric
2
- VERSION = "0.1.12"
2
+ VERSION = "0.1.13"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mettric
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jannis Hermanns