salestation 3.6.0 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/salestation/web/statsd_middleware.rb +4 -3
- data/salestation.gemspec +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: 7c1c39aa648194b22cc8f4e75bccddaa3d51992c5fcd6c85facadb6960f52db0
|
4
|
+
data.tar.gz: 9d2132d9c51921bec0146a5a22c7cc7f6c5dbbf3ef5a044cd1f405d4e4953e78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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: '
|
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
|
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:#{
|
31
|
-
"method:#{
|
32
|
-
"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)
|
data/salestation.gemspec
CHANGED
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.
|
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-
|
11
|
+
date: 2020-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|