logtail-rails 0.2.13 → 0.2.14
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/lib/logtail-rails/event_log_subscriber.rb +8 -6
- data/lib/logtail-rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dbc8fb02a00988c89f406be59ac925eba90048afc392ac52c5efca571f835271
|
|
4
|
+
data.tar.gz: 8bb940e1915fd178e7cc6854415f345101ec74b9e441173464624ba94ac7ea5a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e75cc0a7bd43ea6b8cccac45f8f4b3c74e0acea9b833ac14c6b77c1e5ad63fcbc35dc22d9a32b58a6ba41e7ce3b5f964a20b7a0bdc6df2ebc1a6bdfdb84194d0
|
|
7
|
+
data.tar.gz: 7b675f409e820c32dd256371157b155f5b7a902e91e188fe6be389bb139f9ba33797898c4ed43e407928fab5ac4237fd839c123edd3e45c7378467a787e8f9de
|
|
@@ -43,14 +43,16 @@ module Logtail
|
|
|
43
43
|
|
|
44
44
|
private
|
|
45
45
|
|
|
46
|
-
# Rails 8.
|
|
47
|
-
#
|
|
48
|
-
#
|
|
46
|
+
# Rails 8.1+ reports its own instrumentation (controller calls, SQL queries, template
|
|
47
|
+
# renders, ...) to Rails.event as well, through the ActiveSupport::StructuredEventSubscriber
|
|
48
|
+
# it attaches for each of its components. The Rails log subscribers, and ours replacing
|
|
49
|
+
# them, already log those, so only the application's own events are forwarded.
|
|
49
50
|
def framework_event?(event)
|
|
50
|
-
return false unless defined?(::ActiveSupport::
|
|
51
|
+
return false unless defined?(::ActiveSupport::StructuredEventSubscriber)
|
|
51
52
|
|
|
52
|
-
::ActiveSupport::
|
|
53
|
-
|
|
53
|
+
::ActiveSupport::StructuredEventSubscriber.descendants.any? do |bridge|
|
|
54
|
+
# The namespace attach_to recorded is a private reader on ActiveSupport::Subscriber
|
|
55
|
+
event[:name].start_with?("#{bridge.send(:namespace)}.")
|
|
54
56
|
end
|
|
55
57
|
end
|
|
56
58
|
|