appsignal 4.8.4 → 4.8.5
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/CHANGELOG.md +13 -0
- data/Gemfile +1 -0
- data/appsignal.gemspec +1 -1
- data/build_matrix.yml +6 -6
- data/ext/agent.rb +27 -27
- data/lib/appsignal/hooks/active_job.rb +32 -32
- data/lib/appsignal/integrations/delayed_job_plugin.rb +28 -26
- data/lib/appsignal/integrations/rake.rb +20 -18
- data/lib/appsignal/integrations/sidekiq.rb +34 -32
- data/lib/appsignal/integrations/webmachine.rb +11 -8
- data/lib/appsignal/version.rb +1 -1
- data/sig/appsignal.rbi +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d1322a700e74b489d04466abb766013edaed9a75e2deb04fd43d6efef4d19815
|
|
4
|
+
data.tar.gz: 54dadfa92bb72fa544658368b330b5f4ce3d5226e701124c540a29436c6bd7aa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 00c6126c767cb9d006801e3541bb2fba652f10a176c60d6ae743fb7888da547c0a6f49282f997908a4337035865f8f4a311575769a307879e891070a611679d0
|
|
7
|
+
data.tar.gz: 778b97752cfaaebb650cb5da937a645bef4eb47d3632b3a84828a9b806fe138588b66cc4aa69e7edcc2578f2a1977a958679c4f8c026d3b748b1a3e823877f3d
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# AppSignal for Ruby gem Changelog
|
|
2
2
|
|
|
3
|
+
## 4.8.5
|
|
4
|
+
|
|
5
|
+
_Published on 2026-06-02._
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Exclude more Sidekiq internal job attributes (`cattr`, `tags`, `retry_for` and `unique_for`) from the tags reported for Sidekiq jobs. (patch [98c6ff95](https://github.com/appsignal/appsignal-ruby/commit/98c6ff95b82cb252cc4ef266e961acc6d923d4d1))
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Continue reporting non-disk host metrics when a mount is frozen. (patch [9baeaa4b](https://github.com/appsignal/appsignal-ruby/commit/9baeaa4bb7d2224ece5fd64ba52c1ad4783feea0))
|
|
14
|
+
- Prevent a `NoMethodError` in the Active Job, Rake, Sidekiq, Delayed Job, and WebMachine instrumentations when the creation of an AppSignal transaction is interrupted by process shutdown signals. (patch [27eb1dc7](https://github.com/appsignal/appsignal-ruby/commit/27eb1dc71e5535735f5c354b01f123733832afe2))
|
|
15
|
+
|
|
3
16
|
## 4.8.4
|
|
4
17
|
|
|
5
18
|
_Published on 2026-03-20._
|
data/Gemfile
CHANGED
data/appsignal.gemspec
CHANGED
|
@@ -67,5 +67,5 @@ Gem::Specification.new do |gem| # rubocop:disable Metrics/BlockLength
|
|
|
67
67
|
gem.add_development_dependency("sord") unless RUBY_PLATFORM == "java"
|
|
68
68
|
gem.add_development_dependency "timecop"
|
|
69
69
|
gem.add_development_dependency "webmock"
|
|
70
|
-
gem.add_development_dependency "yard", "
|
|
70
|
+
gem.add_development_dependency "yard", "0.9.40"
|
|
71
71
|
end
|
data/build_matrix.yml
CHANGED
|
@@ -13,6 +13,9 @@ github:
|
|
|
13
13
|
cancel-in-progress: ${{ !contains(github.ref, 'main')}}
|
|
14
14
|
|
|
15
15
|
jobs:
|
|
16
|
+
validate-changesets:
|
|
17
|
+
uses: ./.github/workflows/validate_changesets.yml
|
|
18
|
+
|
|
16
19
|
lint-git:
|
|
17
20
|
name: "Git linter (Lintje)"
|
|
18
21
|
runs-on: ubuntu-latest
|
|
@@ -43,7 +46,7 @@ github:
|
|
|
43
46
|
- uses: actions/checkout@v4
|
|
44
47
|
- uses: ruby/setup-ruby@v1
|
|
45
48
|
with:
|
|
46
|
-
ruby-version: "
|
|
49
|
+
ruby-version: "4.0"
|
|
47
50
|
bundler-cache: true
|
|
48
51
|
- name: "Generate fresh signatures and check sync"
|
|
49
52
|
run: |
|
|
@@ -134,12 +137,9 @@ matrix:
|
|
|
134
137
|
- gem: "code_ownership"
|
|
135
138
|
only:
|
|
136
139
|
ruby:
|
|
140
|
+
- "4.0.0"
|
|
137
141
|
- "3.4.1"
|
|
138
|
-
|
|
139
|
-
- "3.2.5"
|
|
140
|
-
- "3.1.6"
|
|
141
|
-
- "3.0.7"
|
|
142
|
-
- "2.7.8"
|
|
142
|
+
- "3.3.4"
|
|
143
143
|
- "jruby-9.4.7.0"
|
|
144
144
|
- gem: "dry-monitor"
|
|
145
145
|
only:
|
data/ext/agent.rb
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
# Modifications to this file will be overwritten with the next agent release.
|
|
7
7
|
|
|
8
8
|
APPSIGNAL_AGENT_CONFIG = {
|
|
9
|
-
"version" => "0.36.
|
|
9
|
+
"version" => "0.36.11",
|
|
10
10
|
"mirrors" => [
|
|
11
11
|
"https://d135dj0rjqvssy.cloudfront.net",
|
|
12
12
|
"https://appsignal-agent-releases.global.ssl.fastly.net"
|
|
@@ -14,131 +14,131 @@ APPSIGNAL_AGENT_CONFIG = {
|
|
|
14
14
|
"triples" => {
|
|
15
15
|
"x86_64-darwin" => {
|
|
16
16
|
"static" => {
|
|
17
|
-
"checksum" => "
|
|
17
|
+
"checksum" => "9b4bfd1f7149511cd3a1525fe43c6e450688d6d44b25a769aa722a3260756eb6",
|
|
18
18
|
"filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
|
|
19
19
|
},
|
|
20
20
|
"dynamic" => {
|
|
21
|
-
"checksum" => "
|
|
21
|
+
"checksum" => "e4154d44e8e57dcdec78f68a3bfe4139f82938fac6cbaa70b845b3f402df00c9",
|
|
22
22
|
"filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"universal-darwin" => {
|
|
26
26
|
"static" => {
|
|
27
|
-
"checksum" => "
|
|
27
|
+
"checksum" => "9b4bfd1f7149511cd3a1525fe43c6e450688d6d44b25a769aa722a3260756eb6",
|
|
28
28
|
"filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
|
|
29
29
|
},
|
|
30
30
|
"dynamic" => {
|
|
31
|
-
"checksum" => "
|
|
31
|
+
"checksum" => "e4154d44e8e57dcdec78f68a3bfe4139f82938fac6cbaa70b845b3f402df00c9",
|
|
32
32
|
"filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"aarch64-darwin" => {
|
|
36
36
|
"static" => {
|
|
37
|
-
"checksum" => "
|
|
37
|
+
"checksum" => "95eb75d1c9d3c4f24edf94f88babc9daddeca8afc63ff0f85577128d3e5581b8",
|
|
38
38
|
"filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
|
|
39
39
|
},
|
|
40
40
|
"dynamic" => {
|
|
41
|
-
"checksum" => "
|
|
41
|
+
"checksum" => "dd966d1c22416d6917c8318fd9264537b7a30e72a635b7a3161499222fe54654",
|
|
42
42
|
"filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"arm64-darwin" => {
|
|
46
46
|
"static" => {
|
|
47
|
-
"checksum" => "
|
|
47
|
+
"checksum" => "95eb75d1c9d3c4f24edf94f88babc9daddeca8afc63ff0f85577128d3e5581b8",
|
|
48
48
|
"filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
|
|
49
49
|
},
|
|
50
50
|
"dynamic" => {
|
|
51
|
-
"checksum" => "
|
|
51
|
+
"checksum" => "dd966d1c22416d6917c8318fd9264537b7a30e72a635b7a3161499222fe54654",
|
|
52
52
|
"filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
"arm-darwin" => {
|
|
56
56
|
"static" => {
|
|
57
|
-
"checksum" => "
|
|
57
|
+
"checksum" => "95eb75d1c9d3c4f24edf94f88babc9daddeca8afc63ff0f85577128d3e5581b8",
|
|
58
58
|
"filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
|
|
59
59
|
},
|
|
60
60
|
"dynamic" => {
|
|
61
|
-
"checksum" => "
|
|
61
|
+
"checksum" => "dd966d1c22416d6917c8318fd9264537b7a30e72a635b7a3161499222fe54654",
|
|
62
62
|
"filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"aarch64-linux" => {
|
|
66
66
|
"static" => {
|
|
67
|
-
"checksum" => "
|
|
67
|
+
"checksum" => "eb3c3dc1842023a1959fb61d4ea711bd5439ba0268f124ec540eabb70d0343bb",
|
|
68
68
|
"filename" => "appsignal-aarch64-linux-all-static.tar.gz"
|
|
69
69
|
},
|
|
70
70
|
"dynamic" => {
|
|
71
|
-
"checksum" => "
|
|
71
|
+
"checksum" => "052b62ede74bad917bb872f118b161f73658bbe03e7bc43dc54f792229d1ccd7",
|
|
72
72
|
"filename" => "appsignal-aarch64-linux-all-dynamic.tar.gz"
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
"i686-linux" => {
|
|
76
76
|
"static" => {
|
|
77
|
-
"checksum" => "
|
|
77
|
+
"checksum" => "f4920fb2bf88b6cac45d85653e563ec4e7aaccb7456884db7170b5c0a8fc8a2d",
|
|
78
78
|
"filename" => "appsignal-i686-linux-all-static.tar.gz"
|
|
79
79
|
},
|
|
80
80
|
"dynamic" => {
|
|
81
|
-
"checksum" => "
|
|
81
|
+
"checksum" => "ea4587f9c9f5ebe2dbc2192a33c87967514d85966f71713c8d8d9b1be338f7b4",
|
|
82
82
|
"filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
"x86-linux" => {
|
|
86
86
|
"static" => {
|
|
87
|
-
"checksum" => "
|
|
87
|
+
"checksum" => "f4920fb2bf88b6cac45d85653e563ec4e7aaccb7456884db7170b5c0a8fc8a2d",
|
|
88
88
|
"filename" => "appsignal-i686-linux-all-static.tar.gz"
|
|
89
89
|
},
|
|
90
90
|
"dynamic" => {
|
|
91
|
-
"checksum" => "
|
|
91
|
+
"checksum" => "ea4587f9c9f5ebe2dbc2192a33c87967514d85966f71713c8d8d9b1be338f7b4",
|
|
92
92
|
"filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
"x86_64-linux" => {
|
|
96
96
|
"static" => {
|
|
97
|
-
"checksum" => "
|
|
97
|
+
"checksum" => "66d53361ce71fb3dc9f9926969324ed35ea0adb650d6d422eaa194f084f6c375",
|
|
98
98
|
"filename" => "appsignal-x86_64-linux-all-static.tar.gz"
|
|
99
99
|
},
|
|
100
100
|
"dynamic" => {
|
|
101
|
-
"checksum" => "
|
|
101
|
+
"checksum" => "36a148aedc9d29a28764b39d3eee635b80dbbc6c5547b5604c4739344b01bc58",
|
|
102
102
|
"filename" => "appsignal-x86_64-linux-all-dynamic.tar.gz"
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
105
|
"x86_64-linux-musl" => {
|
|
106
106
|
"static" => {
|
|
107
|
-
"checksum" => "
|
|
107
|
+
"checksum" => "c72faa5d710d10b0906425123d455069950a920ac103641de053789fc8f874be",
|
|
108
108
|
"filename" => "appsignal-x86_64-linux-musl-all-static.tar.gz"
|
|
109
109
|
},
|
|
110
110
|
"dynamic" => {
|
|
111
|
-
"checksum" => "
|
|
111
|
+
"checksum" => "85b15a8e0ae1f5b71f0fd2758526132b003d6f456e1bbc0477054fc66c90c3a0",
|
|
112
112
|
"filename" => "appsignal-x86_64-linux-musl-all-dynamic.tar.gz"
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
115
|
"aarch64-linux-musl" => {
|
|
116
116
|
"static" => {
|
|
117
|
-
"checksum" => "
|
|
117
|
+
"checksum" => "6b874662d6eb3c09226af88ba0726ec116ae29d8882719d2d9eecaff2e49feb9",
|
|
118
118
|
"filename" => "appsignal-aarch64-linux-musl-all-static.tar.gz"
|
|
119
119
|
},
|
|
120
120
|
"dynamic" => {
|
|
121
|
-
"checksum" => "
|
|
121
|
+
"checksum" => "c3a1fe90ec3b0b7752efd45fb05e87a10bc34ea679300ede5b2e58bcb291ac19",
|
|
122
122
|
"filename" => "appsignal-aarch64-linux-musl-all-dynamic.tar.gz"
|
|
123
123
|
}
|
|
124
124
|
},
|
|
125
125
|
"x86_64-freebsd" => {
|
|
126
126
|
"static" => {
|
|
127
|
-
"checksum" => "
|
|
127
|
+
"checksum" => "14fb4946255ff9a327a873d70835458f3037fed0f984fc1d60a3ebfa11a3b6dd",
|
|
128
128
|
"filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
|
|
129
129
|
},
|
|
130
130
|
"dynamic" => {
|
|
131
|
-
"checksum" => "
|
|
131
|
+
"checksum" => "9d3eb11adbec15f709ea29e4a7635ae31e65b2fe85f5da5ee54478785c2c9bb6",
|
|
132
132
|
"filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
|
|
133
133
|
}
|
|
134
134
|
},
|
|
135
135
|
"amd64-freebsd" => {
|
|
136
136
|
"static" => {
|
|
137
|
-
"checksum" => "
|
|
137
|
+
"checksum" => "14fb4946255ff9a327a873d70835458f3037fed0f984fc1d60a3ebfa11a3b6dd",
|
|
138
138
|
"filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
|
|
139
139
|
},
|
|
140
140
|
"dynamic" => {
|
|
141
|
-
"checksum" => "
|
|
141
|
+
"checksum" => "9d3eb11adbec15f709ea29e4a7635ae31e65b2fe85f5da5ee54478785c2c9bb6",
|
|
142
142
|
"filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
|
|
143
143
|
}
|
|
144
144
|
}
|
|
@@ -42,7 +42,7 @@ module Appsignal
|
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
module ActiveJobClassInstrumentation
|
|
45
|
-
def execute(job) # rubocop:disable Metrics/CyclomaticComplexity
|
|
45
|
+
def execute(job) # rubocop:disable Metrics/CyclomaticComplexity
|
|
46
46
|
enqueued_at = job["enqueued_at"]
|
|
47
47
|
queue_start = Time.parse(enqueued_at) if enqueued_at
|
|
48
48
|
queue_time =
|
|
@@ -66,49 +66,49 @@ module Appsignal
|
|
|
66
66
|
Appsignal::Transaction.create(Appsignal::Transaction::BACKGROUND_JOB)
|
|
67
67
|
end
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
begin
|
|
70
70
|
transaction.add_params_if_nil(job["arguments"])
|
|
71
71
|
|
|
72
72
|
transaction_tags = ActiveJobHelpers.transaction_tags_for(job)
|
|
73
73
|
transaction.add_tags(transaction_tags)
|
|
74
74
|
|
|
75
75
|
transaction.set_action(ActiveJobHelpers.action_name(job))
|
|
76
|
-
end
|
|
77
76
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
77
|
+
super
|
|
78
|
+
rescue Exception => exception # rubocop:disable Lint/RescueException
|
|
79
|
+
job_status = :failed
|
|
80
|
+
transaction_set_error(transaction, exception)
|
|
81
|
+
raise exception
|
|
82
|
+
ensure
|
|
83
|
+
if transaction
|
|
84
|
+
# Present in Rails 6 and up
|
|
85
|
+
transaction.set_queue_start((queue_start.to_f * 1_000).to_i) if queue_start
|
|
86
|
+
|
|
87
|
+
unless has_wrapper_transaction
|
|
88
|
+
# Only complete transaction if ActiveJob is not wrapped in
|
|
89
|
+
# another supported integration, such as Sidekiq.
|
|
90
|
+
Appsignal::Transaction.complete_current!
|
|
91
|
+
end
|
|
92
92
|
end
|
|
93
|
-
end
|
|
94
93
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
metrics = ActiveJobHelpers.metrics_for(job)
|
|
95
|
+
metrics.each do |(metric_name, tags)|
|
|
96
|
+
if job_status
|
|
97
|
+
ActiveJobHelpers.increment_counter metric_name, 1,
|
|
98
|
+
tags.merge(:status => job_status)
|
|
99
|
+
end
|
|
98
100
|
ActiveJobHelpers.increment_counter metric_name, 1,
|
|
99
|
-
tags.merge(:status =>
|
|
101
|
+
tags.merge(:status => :processed)
|
|
100
102
|
end
|
|
101
|
-
ActiveJobHelpers.increment_counter metric_name, 1,
|
|
102
|
-
tags.merge(:status => :processed)
|
|
103
|
-
end
|
|
104
103
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
104
|
+
queue_name = job["queue_name"]
|
|
105
|
+
if queue_time && queue_name
|
|
106
|
+
ActiveJobHelpers.add_distribution_value(
|
|
107
|
+
"queue_time",
|
|
108
|
+
queue_time,
|
|
109
|
+
:queue => queue_name
|
|
110
|
+
)
|
|
111
|
+
end
|
|
112
112
|
end
|
|
113
113
|
end
|
|
114
114
|
|
|
@@ -20,35 +20,37 @@ module Appsignal
|
|
|
20
20
|
transaction =
|
|
21
21
|
Appsignal::Transaction.create(Appsignal::Transaction::BACKGROUND_JOB)
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
23
|
+
begin
|
|
24
|
+
Appsignal.instrument("perform_job.delayed_job") do
|
|
25
|
+
block.call(job)
|
|
26
|
+
end
|
|
27
|
+
rescue Exception => error # rubocop:disable Lint/RescueException
|
|
28
|
+
transaction.set_error(error)
|
|
29
|
+
raise
|
|
30
|
+
ensure
|
|
31
|
+
payload = job.payload_object
|
|
32
|
+
if payload.respond_to? :job_data
|
|
33
|
+
# ActiveJob
|
|
34
|
+
job_data = payload.job_data
|
|
35
|
+
transaction.set_action_if_nil("#{job_data["job_class"]}#perform")
|
|
36
|
+
transaction.add_params_if_nil(job_data.fetch("arguments", {}))
|
|
37
|
+
else
|
|
38
|
+
# Delayed Job
|
|
39
|
+
transaction.set_action_if_nil(action_name_from_payload(payload, job.name))
|
|
40
|
+
transaction.add_params_if_nil(extract_value(payload, :args, {}))
|
|
41
|
+
end
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
transaction.add_tags(
|
|
44
|
+
:id => extract_value(job, :id, nil, true),
|
|
45
|
+
:queue => extract_value(job, :queue),
|
|
46
|
+
:priority => extract_value(job, :priority, 0),
|
|
47
|
+
:attempts => extract_value(job, :attempts, 0)
|
|
48
|
+
)
|
|
48
49
|
|
|
49
|
-
|
|
50
|
+
transaction.set_queue_start(extract_value(job, :run_at)&.to_i&.* 1_000)
|
|
50
51
|
|
|
51
|
-
|
|
52
|
+
Appsignal::Transaction.complete_current!
|
|
53
|
+
end
|
|
52
54
|
end
|
|
53
55
|
|
|
54
56
|
def self.action_name_from_payload(payload, default_name)
|
|
@@ -21,24 +21,26 @@ module Appsignal
|
|
|
21
21
|
_appsignal_create_transaction
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
24
|
+
begin
|
|
25
|
+
Appsignal.instrument "task.rake" do
|
|
26
|
+
super
|
|
27
|
+
end
|
|
28
|
+
rescue Exception => error # rubocop:disable Lint/RescueException
|
|
29
|
+
Appsignal::Integrations::RakeIntegrationHelper.register_at_exit_hook
|
|
30
|
+
unless RakeIntegration.ignored_error?(error)
|
|
31
|
+
transaction ||= _appsignal_create_transaction
|
|
32
|
+
transaction.set_error(error)
|
|
33
|
+
end
|
|
34
|
+
raise error
|
|
35
|
+
ensure
|
|
36
|
+
if transaction
|
|
37
|
+
# Format given arguments and cast to hash if possible
|
|
38
|
+
params, _ = args
|
|
39
|
+
params = params.to_hash if params.respond_to?(:to_hash)
|
|
40
|
+
transaction.set_action(name)
|
|
41
|
+
transaction.add_params_if_nil(params)
|
|
42
|
+
transaction.complete
|
|
43
|
+
end
|
|
42
44
|
end
|
|
43
45
|
end
|
|
44
46
|
|
|
@@ -55,7 +55,8 @@ module Appsignal
|
|
|
55
55
|
|
|
56
56
|
EXCLUDED_JOB_KEYS = %w[
|
|
57
57
|
args backtrace class created_at enqueued_at error_backtrace error_class
|
|
58
|
-
error_message failed_at jid retried_at retry wrapped
|
|
58
|
+
error_message failed_at jid retried_at retry wrapped cattr tags retry_for
|
|
59
|
+
unique_for
|
|
59
60
|
].freeze
|
|
60
61
|
|
|
61
62
|
def self.sidekiq8?
|
|
@@ -74,44 +75,45 @@ module Appsignal
|
|
|
74
75
|
transaction.set_metadata key, value
|
|
75
76
|
end
|
|
76
77
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
transaction
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
78
|
+
begin
|
|
79
|
+
Appsignal.instrument "perform_job.sidekiq", &block
|
|
80
|
+
rescue Exception => exception # rubocop:disable Lint/RescueException
|
|
81
|
+
job_status = :failed
|
|
82
|
+
raise exception
|
|
83
|
+
ensure
|
|
84
|
+
if transaction
|
|
85
|
+
transaction.add_params_if_nil { parse_arguments(item) }
|
|
86
|
+
enqueued_at = item["enqueued_at"]
|
|
87
|
+
queue_start =
|
|
88
|
+
if self.class.sidekiq8?
|
|
89
|
+
enqueued_at.to_i # Sidekiq 8 stores it as epoc milliseconds
|
|
90
|
+
else
|
|
91
|
+
# Convert seconds to milliseconds for Sidekiq 7 and older
|
|
92
|
+
(enqueued_at.to_f * 1000.0).to_i
|
|
93
|
+
end
|
|
94
|
+
transaction.set_queue_start(queue_start)
|
|
95
|
+
transaction.add_tags(:request_id => item["jid"])
|
|
96
|
+
Appsignal::Transaction.complete_current! unless exception
|
|
97
|
+
|
|
98
|
+
queue = item["queue"] || "unknown"
|
|
99
|
+
|
|
100
|
+
if job_status
|
|
101
|
+
increment_counter "queue_job_count", 1,
|
|
102
|
+
:queue => queue,
|
|
103
|
+
:status => job_status
|
|
104
|
+
increment_counter "worker_job_count", 1,
|
|
105
|
+
:worker => action_name,
|
|
106
|
+
:queue => queue,
|
|
107
|
+
:status => job_status
|
|
91
108
|
end
|
|
92
|
-
transaction.set_queue_start(queue_start)
|
|
93
|
-
transaction.add_tags(:request_id => item["jid"])
|
|
94
|
-
Appsignal::Transaction.complete_current! unless exception
|
|
95
|
-
|
|
96
|
-
queue = item["queue"] || "unknown"
|
|
97
|
-
|
|
98
|
-
if job_status
|
|
99
109
|
increment_counter "queue_job_count", 1,
|
|
100
110
|
:queue => queue,
|
|
101
|
-
:status =>
|
|
111
|
+
:status => :processed
|
|
102
112
|
increment_counter "worker_job_count", 1,
|
|
103
113
|
:worker => action_name,
|
|
104
114
|
:queue => queue,
|
|
105
|
-
:status =>
|
|
115
|
+
:status => :processed
|
|
106
116
|
end
|
|
107
|
-
increment_counter "queue_job_count", 1,
|
|
108
|
-
:queue => queue,
|
|
109
|
-
:status => :processed
|
|
110
|
-
increment_counter "worker_job_count", 1,
|
|
111
|
-
:worker => action_name,
|
|
112
|
-
:queue => queue,
|
|
113
|
-
:status => :processed
|
|
114
|
-
|
|
115
117
|
end
|
|
116
118
|
end
|
|
117
119
|
|
|
@@ -12,16 +12,19 @@ module Appsignal
|
|
|
12
12
|
else
|
|
13
13
|
Appsignal::Transaction.create(Appsignal::Transaction::HTTP_REQUEST)
|
|
14
14
|
end
|
|
15
|
-
transaction.add_params_if_nil { request.query }
|
|
16
|
-
transaction.add_headers_if_nil { request.headers if request.respond_to?(:headers) }
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
begin
|
|
17
|
+
transaction.add_params_if_nil { request.query }
|
|
18
|
+
transaction.add_headers_if_nil { request.headers if request.respond_to?(:headers) }
|
|
19
|
+
|
|
20
|
+
Appsignal.instrument("process_action.webmachine") do
|
|
21
|
+
super
|
|
22
|
+
end
|
|
23
|
+
ensure
|
|
24
|
+
transaction.set_action_if_nil("#{resource.class.name}##{request.method}")
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
Appsignal::Transaction.complete_current! unless has_parent_transaction
|
|
27
|
+
end
|
|
25
28
|
end
|
|
26
29
|
|
|
27
30
|
private
|
data/lib/appsignal/version.rb
CHANGED
data/sig/appsignal.rbi
CHANGED
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: 4.8.
|
|
4
|
+
version: 4.8.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Robert Beekman
|
|
@@ -141,16 +141,16 @@ dependencies:
|
|
|
141
141
|
name: yard
|
|
142
142
|
requirement: !ruby/object:Gem::Requirement
|
|
143
143
|
requirements:
|
|
144
|
-
- -
|
|
144
|
+
- - '='
|
|
145
145
|
- !ruby/object:Gem::Version
|
|
146
|
-
version: 0.9.
|
|
146
|
+
version: 0.9.40
|
|
147
147
|
type: :development
|
|
148
148
|
prerelease: false
|
|
149
149
|
version_requirements: !ruby/object:Gem::Requirement
|
|
150
150
|
requirements:
|
|
151
|
-
- -
|
|
151
|
+
- - '='
|
|
152
152
|
- !ruby/object:Gem::Version
|
|
153
|
-
version: 0.9.
|
|
153
|
+
version: 0.9.40
|
|
154
154
|
description: The official appsignal.com gem
|
|
155
155
|
email:
|
|
156
156
|
- support@appsignal.com
|