scout_apm_logging 1.0.2 → 1.0.3
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 +4 -0
- data/lib/scout_apm/logging/loggers/formatter.rb +19 -5
- data/lib/scout_apm/logging/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0d9d5323e07f8b2fe838a030d93123d00a5fb6e289fe7bc78d7ac0bcc2ebc79
|
4
|
+
data.tar.gz: e00d25c837617410f02ec4d6523fd5afdbb37efa633b3ecaf625f5929a1b960f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d126cf0149770bb461251442e7cf2fdb40c536076d3d09131ad3d0df3763e10fb5ec4bb44ceb780b11851ab4c2276934b476033d77bcbb7fa8db7e89eed0339
|
7
|
+
data.tar.gz: 2c441b2bf745ca77aa154d44a536509de405051b8c363d9d8ccb95a6828fa77110b0bc3e196cf3044e7d0e1b837b295de855b428c64e8e6c7fa39d910fcb3d15
|
data/CHANGELOG.md
CHANGED
@@ -56,11 +56,18 @@ module ScoutApm
|
|
56
56
|
|
57
57
|
return {} unless layer
|
58
58
|
|
59
|
-
|
59
|
+
layer_type = layer.type.downcase
|
60
60
|
|
61
|
-
|
61
|
+
layer_parts = layer.name.split('/')
|
62
|
+
name_parts, action = if layer_type == 'controller'
|
63
|
+
[layer_parts[0..-2], layer_parts[-1]]
|
64
|
+
else
|
65
|
+
[layer_parts, nil]
|
66
|
+
end
|
62
67
|
|
63
|
-
|
68
|
+
return {} unless name_parts.any?
|
69
|
+
|
70
|
+
updated_name = name_parts.map(&:capitalize).map { |item| item.split('_').map(&:capitalize).join }.join('::')
|
64
71
|
|
65
72
|
derived_key = "#{layer.type.downcase}_entrypoint".to_sym
|
66
73
|
|
@@ -68,10 +75,17 @@ module ScoutApm
|
|
68
75
|
derived_value_of_scout_name = if action
|
69
76
|
"#{updated_name}#{layer.type.capitalize}##{action}"
|
70
77
|
else
|
71
|
-
|
78
|
+
name_parts[0]
|
72
79
|
end
|
73
80
|
|
74
|
-
{
|
81
|
+
{}.tap do |layer_attributes|
|
82
|
+
if layer_type == 'job'
|
83
|
+
queue = req.instance_variable_get('@layers').find { |lay| lay.type == 'Queue' }
|
84
|
+
layer_attributes[:job_queue] = queue.name if queue
|
85
|
+
end
|
86
|
+
|
87
|
+
layer_attributes[derived_key] = derived_value_of_scout_name
|
88
|
+
end
|
75
89
|
end
|
76
90
|
|
77
91
|
def scout_context
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scout_apm_logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scout APM
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: googleapis-common-protos-types
|
@@ -248,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
248
248
|
- !ruby/object:Gem::Version
|
249
249
|
version: '0'
|
250
250
|
requirements: []
|
251
|
-
rubygems_version: 3.
|
251
|
+
rubygems_version: 3.3.26
|
252
252
|
signing_key:
|
253
253
|
specification_version: 4
|
254
254
|
summary: Ruby Logging Support
|