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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: afcb7b1b21954bcc8aa6e38f041242aa9afe2c50f655a9c354d122831cc0e1de
4
- data.tar.gz: e9faac3383fa04b28cc0a6de9768faa07b9494ffbbb07c98b78bab3a844b52b0
3
+ metadata.gz: b0d9d5323e07f8b2fe838a030d93123d00a5fb6e289fe7bc78d7ac0bcc2ebc79
4
+ data.tar.gz: e00d25c837617410f02ec4d6523fd5afdbb37efa633b3ecaf625f5929a1b960f
5
5
  SHA512:
6
- metadata.gz: abbe727706a4a894d9b2ef97b64139b06d84aaf80e6401c0d76fdc826fef6bd76fdc511775f7f62e461d5da92b0bc7c33fc2abf2da5d8b3b14a4cb9279239301
7
- data.tar.gz: d76bdec91584f94090fbe84ed697b4530d2a5fd9191a9b5fdc9b7b93e21a6d483ef34a7e3759788efc48a9af137d6c29b6b9c632f6e69f5d1b5cc4c4357c9e98
6
+ metadata.gz: 0d126cf0149770bb461251442e7cf2fdb40c536076d3d09131ad3d0df3763e10fb5ec4bb44ceb780b11851ab4c2276934b476033d77bcbb7fa8db7e89eed0339
7
+ data.tar.gz: 2c441b2bf745ca77aa154d44a536509de405051b8c363d9d8ccb95a6828fa77110b0bc3e196cf3044e7d0e1b837b295de855b428c64e8e6c7fa39d910fcb3d15
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.0.3
2
+ * Add capturing of queue for background jobs.
3
+ * Fix entrypoint name capturing for namespaced controllers.
4
+
1
5
  ## 1.0.2
2
6
  * Fix / Re-add logging of configuration values on startup.
3
7
  * Remove raw_bytes from payload.
@@ -56,11 +56,18 @@ module ScoutApm
56
56
 
57
57
  return {} unless layer
58
58
 
59
- name, action = layer.name.split('/')
59
+ layer_type = layer.type.downcase
60
60
 
61
- return {} unless name
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
- updated_name = name.split('_').map(&:capitalize).join
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
- name
78
+ name_parts[0]
72
79
  end
73
80
 
74
- { derived_key => derived_value_of_scout_name }
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ScoutApm
4
4
  module Logging
5
- VERSION = '1.0.2'
5
+ VERSION = '1.0.3'
6
6
  end
7
7
  end
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.2
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: 2024-12-13 00:00:00.000000000 Z
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.0.8
251
+ rubygems_version: 3.3.26
252
252
  signing_key:
253
253
  specification_version: 4
254
254
  summary: Ruby Logging Support