plain_apm 0.8.5 → 0.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/plain_apm/agent.rb +25 -10
- data/lib/plain_apm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 166f1a5259c2358113a5d383baeb578e5b83c311e37986cc31bd41efaa422307
|
4
|
+
data.tar.gz: e24691b831f7272dc7cd86a4460587f230d51eba9ddeb3cf208d73cb8b76639b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 376174018b1fc9d072bc145b579b7300fdc4edde068fe600949233cbef22ad96ca708aeb6d0ce651810a42651d2535b8a4072adcd9b880d0420fe388b2c7ce61
|
7
|
+
data.tar.gz: 85af3e06b5498aefb062af05cba03feefa2ca6db1cfe9e8959c69e309f6769e6b7c64d335fad71358d09c1e0c0daf380c44be3fa9a473023c30a438caff2b043
|
data/lib/plain_apm/agent.rb
CHANGED
@@ -15,6 +15,10 @@ module PlainApm
|
|
15
15
|
instance.start
|
16
16
|
end
|
17
17
|
|
18
|
+
def self.stop
|
19
|
+
instance.stop
|
20
|
+
end
|
21
|
+
|
18
22
|
def collect(event)
|
19
23
|
return unless @config.enabled
|
20
24
|
|
@@ -38,7 +42,17 @@ module PlainApm
|
|
38
42
|
install_hooks
|
39
43
|
|
40
44
|
# TODO: add a cleaner shutdown.
|
41
|
-
at_exit {
|
45
|
+
at_exit { stop }
|
46
|
+
end
|
47
|
+
|
48
|
+
def stop
|
49
|
+
return if @publisher.nil?
|
50
|
+
|
51
|
+
uninstall_hooks
|
52
|
+
|
53
|
+
@events << nil
|
54
|
+
@publisher.join
|
55
|
+
@publisher = nil
|
42
56
|
end
|
43
57
|
|
44
58
|
private
|
@@ -48,7 +62,15 @@ module PlainApm
|
|
48
62
|
end
|
49
63
|
|
50
64
|
def install_hooks
|
51
|
-
|
65
|
+
hooks.each(&:install)
|
66
|
+
end
|
67
|
+
|
68
|
+
def uninstall_hooks
|
69
|
+
hooks.each(&:uninstall)
|
70
|
+
end
|
71
|
+
|
72
|
+
def hooks
|
73
|
+
@hooks ||= [
|
52
74
|
Hooks::Deploy,
|
53
75
|
Hooks::ActionMailer,
|
54
76
|
Hooks::ActionPack,
|
@@ -58,14 +80,7 @@ module PlainApm
|
|
58
80
|
Hooks::ActiveSupport,
|
59
81
|
Hooks::ErrorReporter,
|
60
82
|
Hooks::Manual
|
61
|
-
].map(&:new)
|
62
|
-
end
|
63
|
-
|
64
|
-
def shutdown
|
65
|
-
return if @publisher.nil?
|
66
|
-
|
67
|
-
@events << nil
|
68
|
-
@publisher.join
|
83
|
+
].map(&:new)
|
69
84
|
end
|
70
85
|
|
71
86
|
##
|
data/lib/plain_apm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plain_apm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PlainAPM Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|