yabeda-hotcell 1.0.0 → 1.2.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 +1 -1
- data/lib/yabeda/hot_cell/version.rb +1 -1
- data/lib/yabeda/hot_cell.rb +13 -5
- metadata +7 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '08e37bf27a67e99b44e883564b88243aaf6d37acc6fae614a917a118c88dbc9e'
|
|
4
|
+
data.tar.gz: 635a1704ac76d9e59005da3457ab42347e34f2ee1ea5877f4c73ff5805510c29
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 45edbd08373a6ad31d2c943f462f80030a566cb16f88e87297df1f52ce83c19e22819b692b7aa026174e1e1ec1f06ef2f7aa413a35a968302e1aaa663fe7fd4f
|
|
7
|
+
data.tar.gz: 410bbadf75e14d945fb8d2bb5d34bff87d8ac54c45b1337aab6badbf6254347ed0c260a9cb6a6cbd3ddc519ead8b1e9991e36d3f7c3e65ae94d9ded718e44c98
|
data/README.md
CHANGED
data/lib/yabeda/hot_cell.rb
CHANGED
|
@@ -18,7 +18,7 @@ module Yabeda
|
|
|
18
18
|
Yabeda.configure do
|
|
19
19
|
group :hotcell
|
|
20
20
|
|
|
21
|
-
counter :requests, comment: "Calls through perform_in_hotcell, by
|
|
21
|
+
counter :requests, comment: "Calls through perform_in_hotcell, by code",
|
|
22
22
|
tags: %i[ cell operation code cause ]
|
|
23
23
|
histogram :perform, comment: "Time the cell spent performing", unit: :seconds,
|
|
24
24
|
tags: %i[ cell operation ], buckets: [ 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10, 30, 120 ]
|
|
@@ -33,7 +33,9 @@ module Yabeda
|
|
|
33
33
|
tags: %i[ cell ], aggregation: :most_recent
|
|
34
34
|
gauge :killed, comment: "Workers killed since boot, by cause",
|
|
35
35
|
tags: %i[ cell cause ], aggregation: :most_recent
|
|
36
|
-
gauge :uptime_seconds, comment: "Seconds since the supervisor booted",
|
|
36
|
+
gauge :uptime_seconds, comment: "Seconds since the supervisor booted. Deprecated: use start_time_seconds",
|
|
37
|
+
tags: %i[ cell ], aggregation: :most_recent
|
|
38
|
+
gauge :start_time_seconds, comment: "When the supervisor booted, in seconds since the Unix epoch",
|
|
37
39
|
tags: %i[ cell ], aggregation: :most_recent
|
|
38
40
|
|
|
39
41
|
collect { Yabeda::HotCell.collect_stats }
|
|
@@ -70,12 +72,17 @@ module Yabeda
|
|
|
70
72
|
# A failed call is not reported from here: the raise the caller sees already reaches the error reporter.
|
|
71
73
|
def self.record_perform(event)
|
|
72
74
|
labels = { cell: event.payload[:cell], operation: event.payload[:operation] }
|
|
75
|
+
code = event.payload[:code]
|
|
73
76
|
|
|
74
77
|
# Empty rather than absent, because a label that is sometimes missing is a separate series in Prometheus
|
|
75
78
|
# and a query by code would silently split.
|
|
76
|
-
Yabeda.hotcell.requests.increment(labels.merge(code: event.payload[:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
Yabeda.hotcell.requests.increment(labels.merge(code: code, cause: event.payload[:cause].to_s))
|
|
80
|
+
|
|
81
|
+
# The event has no perform_ms when the cell refuses the call with `capacity`, when the client fails the
|
|
82
|
+
# call itself with `unavailable` or `timeout`, or when an exception interrupts the call. Recording 0
|
|
83
|
+
# would pull down the low percentiles.
|
|
84
|
+
perform_ms = event.payload[:perform_ms]
|
|
85
|
+
Yabeda.hotcell.perform.measure(labels, perform_ms / 1000.0) if perform_ms
|
|
79
86
|
end
|
|
80
87
|
|
|
81
88
|
private_class_method def self.set_counters(cell, counters)
|
|
@@ -86,6 +93,7 @@ module Yabeda
|
|
|
86
93
|
Yabeda.hotcell.queue_high_water.set(tags, counters[:queue_high_water])
|
|
87
94
|
Yabeda.hotcell.cancelled.set(tags, counters[:cancelled])
|
|
88
95
|
Yabeda.hotcell.uptime_seconds.set(tags, counters[:uptime_s])
|
|
96
|
+
Yabeda.hotcell.start_time_seconds.set(tags, counters[:start_time_s]) if counters[:start_time_s]
|
|
89
97
|
::HotCell::Codes::PERMANENT_BY_CAUSE.each_key do |cause|
|
|
90
98
|
Yabeda.hotcell.killed.set(tags.merge(cause: cause), counters[:killed_by].fetch(cause.to_sym, 0))
|
|
91
99
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: yabeda-hotcell
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mike Dalessio
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 1.
|
|
18
|
+
version: 1.2.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 1.
|
|
25
|
+
version: 1.2.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: yabeda
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -38,7 +38,7 @@ dependencies:
|
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
39
|
version: '0.12'
|
|
40
40
|
description: |
|
|
41
|
-
Yabeda metrics for an application that calls
|
|
41
|
+
Yabeda metrics for an application that calls Hot Cell cells: a counter and a histogram for every call,
|
|
42
42
|
and gauges polled from each local cell's control socket.
|
|
43
43
|
email:
|
|
44
44
|
- mike@37signals.com
|
|
@@ -56,8 +56,8 @@ licenses:
|
|
|
56
56
|
- MIT
|
|
57
57
|
metadata:
|
|
58
58
|
homepage_uri: https://github.com/basecamp/hotcell
|
|
59
|
-
source_code_uri: https://github.com/basecamp/hotcell/tree/v1.
|
|
60
|
-
changelog_uri: https://github.com/basecamp/hotcell/blob/v1.
|
|
59
|
+
source_code_uri: https://github.com/basecamp/hotcell/tree/v1.2.0/yabeda-hotcell
|
|
60
|
+
changelog_uri: https://github.com/basecamp/hotcell/blob/v1.2.0/CHANGELOG.md
|
|
61
61
|
documentation_uri: https://basecamp.github.io/hotcell/
|
|
62
62
|
bug_tracker_uri: https://github.com/basecamp/hotcell/issues
|
|
63
63
|
rubygems_mfa_required: 'true'
|
|
@@ -77,5 +77,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
77
77
|
requirements: []
|
|
78
78
|
rubygems_version: 4.0.6
|
|
79
79
|
specification_version: 4
|
|
80
|
-
summary: Yabeda metrics for
|
|
80
|
+
summary: Yabeda metrics for Hot Cell.
|
|
81
81
|
test_files: []
|