appsignal 4.8.4 → 4.8.6
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 +25 -0
- data/Gemfile +1 -0
- data/README.md +2 -2
- data/SUPPORT.md +1 -1
- data/appsignal.gemspec +1 -1
- data/build_matrix.yml +16 -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: a798e4fb3b6681b0f7727ebcfc8bf0a252c8e186d400b3b027721ff3b401b2fc
|
|
4
|
+
data.tar.gz: '07290f125fa787fb511c9d5db76625cbb2a791d3b69b6f11916bf7f6c9ce907f'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f0af3a382e8d4ef769a3f4f999586cca43c3cb7e3e14150658c29201cd1a75f82ef68f2b3583e08413d557e55d014b285146d32754c36748ce70a0f1bb955784
|
|
7
|
+
data.tar.gz: 1d44c692006eede99c48325d0f9a4b1476d0adfcf3c39ad5af3fe6f88f3145bf196562d44ab1b4254e91fd70c691c764d43dd37fde41a323969abf3222a74842
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# AppSignal for Ruby gem Changelog
|
|
2
2
|
|
|
3
|
+
## 4.8.6
|
|
4
|
+
|
|
5
|
+
_Published on 2026-06-23._
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fix host-metrics leaking zombie `[timeout]` processes in Alpine linux containers.
|
|
10
|
+
|
|
11
|
+
Before this release AppSignal agent relied on a proper init process that reaps child processes killed by system `timeout`. Now the agent terminates and reaps unresponsive child processes in host-metrics collection and a subreaper is no longer required.
|
|
12
|
+
|
|
13
|
+
(patch [d151eb7e](https://github.com/appsignal/appsignal-ruby/commit/d151eb7e1e8b05b42f5bf0426e267108294335fa))
|
|
14
|
+
|
|
15
|
+
## 4.8.5
|
|
16
|
+
|
|
17
|
+
_Published on 2026-06-02._
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- 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))
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- Continue reporting non-disk host metrics when a mount is frozen. (patch [9baeaa4b](https://github.com/appsignal/appsignal-ruby/commit/9baeaa4bb7d2224ece5fd64ba52c1ad4783feea0))
|
|
26
|
+
- 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))
|
|
27
|
+
|
|
3
28
|
## 4.8.4
|
|
4
29
|
|
|
5
30
|
_Published on 2026-03-20._
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -279,9 +279,9 @@ This gem uses [Semantic Versioning][semver].
|
|
|
279
279
|
The `main` branch corresponds to the current stable release of the gem.
|
|
280
280
|
|
|
281
281
|
The `develop` branch is used for development of features that will end up in
|
|
282
|
-
the next minor release.
|
|
282
|
+
the next minor release, if present.
|
|
283
283
|
|
|
284
|
-
Open a Pull Request on the `main` branch if you're fixing a bug. For new
|
|
284
|
+
Open a Pull Request on the `main` branch if you're fixing a bug. For new
|
|
285
285
|
features, open a Pull Request on the `develop` branch.
|
|
286
286
|
|
|
287
287
|
Every stable and unstable release is tagged in git with a version tag.
|
data/SUPPORT.md
CHANGED
|
@@ -5,7 +5,7 @@ AppSignal. They will help you get set up, tweak your code and make sure you get
|
|
|
5
5
|
the most out of using AppSignal. You can also find our documentation at
|
|
6
6
|
[docs.appsignal.com](https://docs.appsignal.com/).
|
|
7
7
|
|
|
8
|
-
We do not recommend creating an issue on
|
|
8
|
+
We do not recommend creating an issue on this project's GitHub repository if it
|
|
9
9
|
concerns your private app data. During the support process we'll need the
|
|
10
10
|
AppSignal logs and other resources that contain your app's private data,
|
|
11
11
|
something for which the public GitHub issue tracker is not suited.
|
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:
|
|
@@ -267,6 +267,16 @@ matrix:
|
|
|
267
267
|
- "3.4.1"
|
|
268
268
|
- "3.3.4"
|
|
269
269
|
- "3.2.5"
|
|
270
|
+
- gem: "resque-2"
|
|
271
|
+
- gem: "resque-3"
|
|
272
|
+
only:
|
|
273
|
+
ruby:
|
|
274
|
+
- "4.0.0"
|
|
275
|
+
- "3.4.1"
|
|
276
|
+
- "3.3.4"
|
|
277
|
+
- "3.2.5"
|
|
278
|
+
- "3.1.6"
|
|
279
|
+
- "3.0.7"
|
|
270
280
|
- gem: "sequel"
|
|
271
281
|
- gem: "sinatra"
|
|
272
282
|
- gem: "webmachine2"
|
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.12",
|
|
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" => "a63189a2ba6b500e038e5658f97478ceae27a956baa2f89a4e79ee5a1dadace6",
|
|
18
18
|
"filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
|
|
19
19
|
},
|
|
20
20
|
"dynamic" => {
|
|
21
|
-
"checksum" => "
|
|
21
|
+
"checksum" => "ecfb108dcc4d10f442415debaceed6d2e568b44ab938cf0ed6fee3ccfbdc5379",
|
|
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" => "a63189a2ba6b500e038e5658f97478ceae27a956baa2f89a4e79ee5a1dadace6",
|
|
28
28
|
"filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
|
|
29
29
|
},
|
|
30
30
|
"dynamic" => {
|
|
31
|
-
"checksum" => "
|
|
31
|
+
"checksum" => "ecfb108dcc4d10f442415debaceed6d2e568b44ab938cf0ed6fee3ccfbdc5379",
|
|
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" => "d23d6cc15e7df1c810b55dc33905002c5a1d6bc3f7cb10690d7e21398aabdac0",
|
|
38
38
|
"filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
|
|
39
39
|
},
|
|
40
40
|
"dynamic" => {
|
|
41
|
-
"checksum" => "
|
|
41
|
+
"checksum" => "b4f9bf20f87fc7ddd8cc307646a956f734a2153323cc01487ced322263f32c2b",
|
|
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" => "d23d6cc15e7df1c810b55dc33905002c5a1d6bc3f7cb10690d7e21398aabdac0",
|
|
48
48
|
"filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
|
|
49
49
|
},
|
|
50
50
|
"dynamic" => {
|
|
51
|
-
"checksum" => "
|
|
51
|
+
"checksum" => "b4f9bf20f87fc7ddd8cc307646a956f734a2153323cc01487ced322263f32c2b",
|
|
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" => "d23d6cc15e7df1c810b55dc33905002c5a1d6bc3f7cb10690d7e21398aabdac0",
|
|
58
58
|
"filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
|
|
59
59
|
},
|
|
60
60
|
"dynamic" => {
|
|
61
|
-
"checksum" => "
|
|
61
|
+
"checksum" => "b4f9bf20f87fc7ddd8cc307646a956f734a2153323cc01487ced322263f32c2b",
|
|
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" => "0a277e682f1568fbc54df849a46f21f155643b40c285a5bd30294c9d046e49c2",
|
|
68
68
|
"filename" => "appsignal-aarch64-linux-all-static.tar.gz"
|
|
69
69
|
},
|
|
70
70
|
"dynamic" => {
|
|
71
|
-
"checksum" => "
|
|
71
|
+
"checksum" => "94e0193908955e7a3a274a37947e234c5b038aa26c0ea9b371a08fd63441a940",
|
|
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" => "0d4536a2b1c9b6915f0f8597bd858988e284e7dbc4a14488332ffa7e401a1134",
|
|
78
78
|
"filename" => "appsignal-i686-linux-all-static.tar.gz"
|
|
79
79
|
},
|
|
80
80
|
"dynamic" => {
|
|
81
|
-
"checksum" => "
|
|
81
|
+
"checksum" => "c5df66876e4611d5ef8798013f0188469cbdea6753a9b9d6cf54bd858e6331e9",
|
|
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" => "0d4536a2b1c9b6915f0f8597bd858988e284e7dbc4a14488332ffa7e401a1134",
|
|
88
88
|
"filename" => "appsignal-i686-linux-all-static.tar.gz"
|
|
89
89
|
},
|
|
90
90
|
"dynamic" => {
|
|
91
|
-
"checksum" => "
|
|
91
|
+
"checksum" => "c5df66876e4611d5ef8798013f0188469cbdea6753a9b9d6cf54bd858e6331e9",
|
|
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" => "eec59a3e46dd5d5baff044465b4e314f21edf6270500bf24e3bc50afcee5f2e2",
|
|
98
98
|
"filename" => "appsignal-x86_64-linux-all-static.tar.gz"
|
|
99
99
|
},
|
|
100
100
|
"dynamic" => {
|
|
101
|
-
"checksum" => "
|
|
101
|
+
"checksum" => "37471e17c5cb9f252d039cfbc0c01d570698c2245f6c8783fd2778e640b59a54",
|
|
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" => "4454ec095ad14813bedea20a110a26235dbc6e8e33538219fad325792c0d888e",
|
|
108
108
|
"filename" => "appsignal-x86_64-linux-musl-all-static.tar.gz"
|
|
109
109
|
},
|
|
110
110
|
"dynamic" => {
|
|
111
|
-
"checksum" => "
|
|
111
|
+
"checksum" => "4c21039b077b0c292d530210e077d942694f4c533d3761ed11e27ca932215131",
|
|
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" => "048a55f0f10087e7954559d6cd09b371a0b532673f7ca769bcfde5729e297a72",
|
|
118
118
|
"filename" => "appsignal-aarch64-linux-musl-all-static.tar.gz"
|
|
119
119
|
},
|
|
120
120
|
"dynamic" => {
|
|
121
|
-
"checksum" => "
|
|
121
|
+
"checksum" => "8dc336cffcb2cffe85daa8c70b02b0af7e626ed81c8873cdbb627216a411d59a",
|
|
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" => "d81d039a3c1936bd393a6140b46f48092da31600b0311eab819acd777521a588",
|
|
128
128
|
"filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
|
|
129
129
|
},
|
|
130
130
|
"dynamic" => {
|
|
131
|
-
"checksum" => "
|
|
131
|
+
"checksum" => "cc345d4a791200e5af53c533e7ad83d278e98ee0becb5b54e502ba8934094372",
|
|
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" => "d81d039a3c1936bd393a6140b46f48092da31600b0311eab819acd777521a588",
|
|
138
138
|
"filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
|
|
139
139
|
},
|
|
140
140
|
"dynamic" => {
|
|
141
|
-
"checksum" => "
|
|
141
|
+
"checksum" => "cc345d4a791200e5af53c533e7ad83d278e98ee0becb5b54e502ba8934094372",
|
|
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.6
|
|
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
|