scout_apm_logging 1.0.1 → 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 +8 -0
- data/gems/rails.gemfile +1 -0
- data/lib/scout_apm/logging/loggers/formatter.rb +19 -6
- data/lib/scout_apm/logging/version.rb +1 -1
- data/lib/scout_apm_logging.rb +1 -0
- data/spec/integration/rails/lifecycle_spec.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
@@ -1,3 +1,11 @@
|
|
1
|
+
## 1.0.3
|
2
|
+
* Add capturing of queue for background jobs.
|
3
|
+
* Fix entrypoint name capturing for namespaced controllers.
|
4
|
+
|
5
|
+
## 1.0.2
|
6
|
+
* Fix / Re-add logging of configuration values on startup.
|
7
|
+
* Remove raw_bytes from payload.
|
8
|
+
|
1
9
|
## 1.0.1
|
2
10
|
* Update google-protobuf dependency to resolve to any version less than 4.x.x.
|
3
11
|
|
data/gems/rails.gemfile
CHANGED
@@ -29,7 +29,6 @@ module ScoutApm
|
|
29
29
|
attributes_to_log.merge!(local_log_location) if ::Logger::Severity.const_get(severity) >= ::Logger::Severity::WARN
|
30
30
|
|
31
31
|
message = "#{attributes_to_log.to_json}\n"
|
32
|
-
attributes_to_log['raw_bytes'] = message
|
33
32
|
|
34
33
|
ScoutApm::Logging::Loggers::OpenTelemetry.logger_provider.logger(
|
35
34
|
name: 'scout_apm',
|
@@ -57,11 +56,18 @@ module ScoutApm
|
|
57
56
|
|
58
57
|
return {} unless layer
|
59
58
|
|
60
|
-
|
59
|
+
layer_type = layer.type.downcase
|
61
60
|
|
62
|
-
|
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
|
63
67
|
|
64
|
-
|
68
|
+
return {} unless name_parts.any?
|
69
|
+
|
70
|
+
updated_name = name_parts.map(&:capitalize).map { |item| item.split('_').map(&:capitalize).join }.join('::')
|
65
71
|
|
66
72
|
derived_key = "#{layer.type.downcase}_entrypoint".to_sym
|
67
73
|
|
@@ -69,10 +75,17 @@ module ScoutApm
|
|
69
75
|
derived_value_of_scout_name = if action
|
70
76
|
"#{updated_name}#{layer.type.capitalize}##{action}"
|
71
77
|
else
|
72
|
-
|
78
|
+
name_parts[0]
|
73
79
|
end
|
74
80
|
|
75
|
-
{
|
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
|
76
89
|
end
|
77
90
|
|
78
91
|
def scout_context
|
data/lib/scout_apm_logging.rb
CHANGED
@@ -17,6 +17,7 @@ module ScoutApm
|
|
17
17
|
initializer 'scout_apm_logging.monitor', after: :initialize_logger, before: :initialize_cache do
|
18
18
|
context = Context.new
|
19
19
|
context.config = Config.with_file(context, context.config.value('config_file'))
|
20
|
+
context.config.log_settings(context.logger)
|
20
21
|
|
21
22
|
Loggers::Capture.new(context).setup!
|
22
23
|
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.
|
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
|