mettric 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.markdown +4 -0
- data/lib/mettric/sidekiq_middleware.rb +5 -3
- data/lib/mettric/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c9d5638b790687d92dd7179b82023a1e9f03182
|
4
|
+
data.tar.gz: 2ede7b8afe717653b2de408c69494eacd6eda754
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1bc4aaa3ab2d115fec09a5330186d382564f67bf25f552a2b59c0f5a36bd304df1fd5824c83a417b2ca7f9c804a3c6c94e43553e2c93b9a2637a1f3cbda3afa
|
7
|
+
data.tar.gz: 075cd837413962f4c9fcae7d9e8350f0613786d406da0271daa6b63253e30115165ef7b01d3b4179c48187e469cb2aec11d27dca6f01404d6c5f3446f9be13e5
|
data/CHANGELOG.markdown
CHANGED
@@ -28,14 +28,16 @@ class Mettric::SidekiqMiddleware
|
|
28
28
|
service = "sidekiq.#{queue.to_s.underscore}.#{worker.class.name.underscore}"
|
29
29
|
|
30
30
|
# Yield & time
|
31
|
-
|
31
|
+
⏱(service: "#{service}.duration", tags: ['sidekiq']) do
|
32
32
|
yield
|
33
33
|
end
|
34
34
|
|
35
35
|
# Track success
|
36
|
-
|
36
|
+
🛎(service: "#{service}.success", tags: ['sidekiq'])
|
37
37
|
rescue => e
|
38
|
-
|
38
|
+
🛎(service: "#{service}.failure", tags: ['sidekiq', 'error'], description: e.to_s) rescue nil
|
39
|
+
|
40
|
+
# Make sure we don't cause trouble
|
39
41
|
raise unless e < Mettric::Error
|
40
42
|
end
|
41
43
|
end
|
data/lib/mettric/version.rb
CHANGED