appsignal 2.9.12.beta.0-java → 2.9.12-java
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 +5 -5
- data/CHANGELOG.md +3 -1
- data/build_matrix.yml +4 -1
- data/gemfiles/rails-6.0.gemfile +1 -1
- data/lib/appsignal/hooks/sequel.rb +1 -1
- data/lib/appsignal/hooks/sidekiq.rb +21 -7
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/hooks/sidekiq_spec.rb +13 -0
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d29de13365132668a4232e38801a320f0a65b02053aec562ffabc17737db7fbc
|
4
|
+
data.tar.gz: 5822eab9b38e092ab33bd14d63c11e0fa5bcb2ae4746e2f43c18be5707c4fe50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 810f4daca2d6bccca1c454badb0ee61b3cc6b7521bf59f77e5683260f8825c53ee74e432088f75f7ba0e01343372755ad833037c7131295b2df807ec4f5c28af
|
7
|
+
data.tar.gz: 16e5e023a2ba9b4d0e618cf384b61be6ecb43d4d7a403d555c5e6af77b0963d98b7aa3263f07065d2d048a079d4b9b4d490edc31d7d987cc59a5d7b21fe0db33
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
3
|
## 2.9.12
|
4
|
-
- Bump agent to a3e0f83
|
4
|
+
- Bump agent to a3e0f83 - commit 3d94dd42645922214fc2f5bc09cfa7c597323198
|
5
5
|
- More reliable detection of whether agent is running on Docker.
|
6
|
+
- Fix Sequel install hook version detection mismatch. PR #553
|
7
|
+
- Improve support for older Sidekiq versions. PR #555
|
6
8
|
|
7
9
|
## 2.9.11
|
8
10
|
- Bump agent to v-a718022
|
data/build_matrix.yml
CHANGED
@@ -49,7 +49,6 @@ matrix:
|
|
49
49
|
minimal:
|
50
50
|
- "no_dependencies"
|
51
51
|
- "rails-5.2"
|
52
|
-
- "rails-6.2"
|
53
52
|
|
54
53
|
ruby:
|
55
54
|
- ruby: "2.0.0"
|
@@ -103,6 +102,10 @@ matrix:
|
|
103
102
|
exclude:
|
104
103
|
ruby:
|
105
104
|
- "2.0.0"
|
105
|
+
- "2.1.8"
|
106
|
+
- "2.2.4"
|
107
|
+
- "2.3.8"
|
108
|
+
- "2.4.5"
|
106
109
|
- gem: "resque"
|
107
110
|
bundler: "1.17.3"
|
108
111
|
- gem: "sequel"
|
data/gemfiles/rails-6.0.gemfile
CHANGED
@@ -42,7 +42,7 @@ module Appsignal
|
|
42
42
|
|
43
43
|
def install
|
44
44
|
# Register the extension...
|
45
|
-
if ::Sequel::MAJOR >= 4 && ::Sequel::MINOR >= 35
|
45
|
+
if (::Sequel::MAJOR >= 4 && ::Sequel::MINOR >= 35) || ::Sequel::MAJOR >= 5
|
46
46
|
::Sequel::Database.register_extension(
|
47
47
|
:appsignal_integration,
|
48
48
|
Appsignal::Hooks::SequelLogConnectionExtension
|
@@ -38,13 +38,29 @@ module Appsignal
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def call
|
41
|
-
|
41
|
+
track_redis_info
|
42
|
+
track_stats
|
43
|
+
track_queues
|
44
|
+
end
|
45
|
+
|
46
|
+
private
|
47
|
+
|
48
|
+
attr_reader :cache
|
49
|
+
|
50
|
+
def track_redis_info
|
51
|
+
return unless ::Sidekiq.respond_to?(:redis_info)
|
42
52
|
redis_info = ::Sidekiq.redis_info
|
43
|
-
|
44
|
-
gauge "process_count", stats.processes_size
|
53
|
+
|
45
54
|
gauge "connection_count", redis_info.fetch("connected_clients")
|
46
55
|
gauge "memory_usage", redis_info.fetch("used_memory")
|
47
56
|
gauge "memory_usage_rss", redis_info.fetch("used_memory_rss")
|
57
|
+
end
|
58
|
+
|
59
|
+
def track_stats
|
60
|
+
stats = ::Sidekiq::Stats.new
|
61
|
+
|
62
|
+
gauge "worker_count", stats.workers_size
|
63
|
+
gauge "process_count", stats.processes_size
|
48
64
|
gauge_delta :jobs_processed, "job_count", stats.processed,
|
49
65
|
:status => :processed
|
50
66
|
gauge_delta :jobs_failed, "job_count", stats.failed, :status => :failed
|
@@ -52,7 +68,9 @@ module Appsignal
|
|
52
68
|
gauge_delta :jobs_dead, "job_count", stats.dead_size, :status => :died
|
53
69
|
gauge "job_count", stats.scheduled_size, :status => :scheduled
|
54
70
|
gauge "job_count", stats.enqueued, :status => :enqueued
|
71
|
+
end
|
55
72
|
|
73
|
+
def track_queues
|
56
74
|
::Sidekiq::Queue.all.each do |queue|
|
57
75
|
gauge "queue_length", queue.size, :queue => queue.name
|
58
76
|
# Convert latency from seconds to milliseconds
|
@@ -60,10 +78,6 @@ module Appsignal
|
|
60
78
|
end
|
61
79
|
end
|
62
80
|
|
63
|
-
private
|
64
|
-
|
65
|
-
attr_reader :cache
|
66
|
-
|
67
81
|
# Track a gauge metric with the `sidekiq_` prefix
|
68
82
|
def gauge(key, value, tags = {})
|
69
83
|
tags[:hostname] = hostname if hostname
|
data/lib/appsignal/version.rb
CHANGED
@@ -732,6 +732,19 @@ describe Appsignal::Hooks::SidekiqProbe do
|
|
732
732
|
probe.call
|
733
733
|
end
|
734
734
|
|
735
|
+
context "when `redis_info` is not defined" do
|
736
|
+
before do
|
737
|
+
allow(Sidekiq).to receive(:respond_to?).with(:redis_info).and_return(false)
|
738
|
+
end
|
739
|
+
|
740
|
+
it "does not collect redis metrics" do
|
741
|
+
expect_gauge("connection_count", 2).never
|
742
|
+
expect_gauge("memory_usage", 1024).never
|
743
|
+
expect_gauge("memory_usage_rss", 512).never
|
744
|
+
probe.call
|
745
|
+
end
|
746
|
+
end
|
747
|
+
|
735
748
|
context "when hostname is configured for probe" do
|
736
749
|
let(:redis_hostname) { "my_redis_server" }
|
737
750
|
let(:probe) { described_class.new(:hostname => redis_hostname) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appsignal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.12
|
4
|
+
version: 2.9.12
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-08-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|
@@ -392,12 +392,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
392
392
|
version: '1.9'
|
393
393
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
394
394
|
requirements:
|
395
|
-
- - "
|
395
|
+
- - ">="
|
396
396
|
- !ruby/object:Gem::Version
|
397
|
-
version:
|
397
|
+
version: '0'
|
398
398
|
requirements: []
|
399
|
-
|
400
|
-
rubygems_version: 2.6.14.3
|
399
|
+
rubygems_version: 3.0.2
|
401
400
|
signing_key:
|
402
401
|
specification_version: 4
|
403
402
|
summary: Logs performance and exception data from your app to appsignal.com
|