salestation 3.6.0 → 3.7.0

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: df4e53ba50397a1c5565b8fe4fb8d4ee34476f8a94931b500f53a83161726f6c
4
- data.tar.gz: '0219eb597b8b0d0b8b72e9eed583ac6657aa10619654f568a1999ee0a453e4d4'
3
+ metadata.gz: 7c1c39aa648194b22cc8f4e75bccddaa3d51992c5fcd6c85facadb6960f52db0
4
+ data.tar.gz: 9d2132d9c51921bec0146a5a22c7cc7f6c5dbbf3ef5a044cd1f405d4e4953e78
5
5
  SHA512:
6
- metadata.gz: 53b6c9e720d3ed2f0a23131aef0b4a197ce285ee105beea398cc001baef631dda572c611f8407fa10b0047e1ff2ee198546892e832ee68651a23195eb77625b8
7
- data.tar.gz: d05d96f08386e284974212afacfa26f57c257c263e09b71396bbaa7d804531bbb8129c5980de3823471b05fef708906ba227c8304fcfa7c4203a33bca752c26d
6
+ metadata.gz: 3f6ba6c35d4e30f10ee547b484457948602d19fcc91da64912bda45ed8043378bea84ceb29d2a5a6912be5c85eb4dc3bf4520b4c96b93e50e4a4e1bebeaf1c57
7
+ data.tar.gz: c116c954f2a544fb5d100718f27c1a599aa1b83b7efa0d0216f365e1137af64d8811a5da362f0652497eb949816bb50e0e1276be0acef67b9caac4b55fefad6f
data/README.md CHANGED
@@ -142,14 +142,14 @@ end
142
142
 
143
143
  Salestation provides a StatsD middleware which can be used record request
144
144
  execution time. A `timing` call with elapsed seconds is made to the provided
145
- StatsD instance with `path`, `method`, `status` tags.
145
+ StatsD instance with `path`, `method`, `status` and `status_class` tags.
146
146
 
147
147
  ```ruby
148
148
  class Webapp < Sinatra::Base
149
149
  # ...
150
150
  use Salestation::Web::StatsdMiddleware,
151
151
  Statsd.new(host, port),
152
- metric: 'my-metric'
152
+ metric: 'my_service.response.time'
153
153
  end
154
154
  ```
155
155
 
@@ -157,7 +157,7 @@ You can configure per-request tags by defining `salestation.statsd.tags` in sina
157
157
 
158
158
  ```ruby
159
159
  def my_handler(env)
160
- env['salestation.statsd.tags'] = ['foo', 'bar']
160
+ env['salestation.statsd.tags'] = ['foo:bar']
161
161
  # ...
162
162
  end
163
163
  ```
@@ -27,9 +27,10 @@ module Salestation
27
27
  end
28
28
 
29
29
  tags = [
30
- "path:#{ path }",
31
- "method:#{ method }",
32
- "status:#{ status }"
30
+ "path:#{path}",
31
+ "method:#{method}",
32
+ "status:#{status}",
33
+ "status_class:#{status / 100}xx"
33
34
  ] + env.fetch(EXTRA_TAGS_ENV_KEY, [])
34
35
 
35
36
  @statsd.timing(@metric, duration_ms(from: start), tags: tags)
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "salestation"
7
- spec.version = "3.6.0"
7
+ spec.version = "3.7.0"
8
8
  spec.authors = ["Glia TechMovers"]
9
9
  spec.email = ["techmovers@glia.com"]
10
10
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: salestation
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.0
4
+ version: 3.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Glia TechMovers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-13 00:00:00.000000000 Z
11
+ date: 2020-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler