appsignal 4.5.13-java → 4.5.14-java
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 +9 -0
- data/lib/appsignal/config.rb +11 -4
- data/lib/appsignal/transaction.rb +16 -4
- data/lib/appsignal/version.rb +1 -1
- data/lib/appsignal.rb +13 -5
- 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: f950926d9f4dd3ecb9adda4fe69e9bd7c9fa85f64a831c93ca980017ce6f392e
|
4
|
+
data.tar.gz: 4197a339909bce0ee679d5969cd842d1ab28a53d36f5f7eee49f85f6aacb7e63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2886c2d88e64ada5f66dd71ad3bd2f6190ab49766e75f06c7e921615d22d8384a9687d3bb365f3f7cb92f1e26abd82c6ac414587952cf627e95ff59bca224135
|
7
|
+
data.tar.gz: 4f05b2d6664dfef43dd94a840268b4e78fe239c1bec43ab3ef531ef35f8e14e6e9a32930ea6f06633e68f623a0998c87f331b5ed4b17d1cd869d7a7eed787743
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# AppSignal for Ruby gem Changelog
|
2
2
|
|
3
|
+
## 4.5.14
|
4
|
+
|
5
|
+
_Published on 2025-05-27._
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
|
9
|
+
- Resolve problems with transactions not being properly closed when using libraries that change Fibers during the transactions. Previously, completed transactions would be attempted to be reused when creating a transaction, when the Fiber would be switched during a transaction. (patch [32733b25](https://github.com/appsignal/appsignal-ruby/commit/32733b25ced393cc7ed4bd6f15f3b6b293b133c5))
|
10
|
+
- Fix a config error log message when the config is not active and should not validate the config. (patch [0d114b43](https://github.com/appsignal/appsignal-ruby/commit/0d114b435f63fe11bebce26efe282f90e2eb57aa))
|
11
|
+
|
3
12
|
## 4.5.13
|
4
13
|
|
5
14
|
_Published on 2025-05-12._
|
data/lib/appsignal/config.rb
CHANGED
@@ -393,8 +393,12 @@ module Appsignal
|
|
393
393
|
@valid
|
394
394
|
end
|
395
395
|
|
396
|
+
def active_for_env?
|
397
|
+
config_hash[:active]
|
398
|
+
end
|
399
|
+
|
396
400
|
def active?
|
397
|
-
|
401
|
+
valid? && active_for_env?
|
398
402
|
end
|
399
403
|
|
400
404
|
# @api private
|
@@ -444,13 +448,16 @@ module Appsignal
|
|
444
448
|
merge(options)
|
445
449
|
end
|
446
450
|
|
447
|
-
#
|
451
|
+
# Apply any overrides for invalid settings.
|
448
452
|
# @api private
|
449
|
-
def
|
450
|
-
# Apply any overrides for invalid settings.
|
453
|
+
def apply_overrides
|
451
454
|
@override_config = determine_overrides
|
452
455
|
merge(override_config)
|
456
|
+
end
|
453
457
|
|
458
|
+
# @return [void]
|
459
|
+
# @api private
|
460
|
+
def validate
|
454
461
|
# Strip path from endpoint so we're backwards compatible with
|
455
462
|
# earlier versions of the gem.
|
456
463
|
# TODO: Move to its own method, maybe in `#[]=`?
|
@@ -27,20 +27,25 @@ module Appsignal
|
|
27
27
|
# @param namespace [String] Namespace of the to be created transaction.
|
28
28
|
# @return [Transaction]
|
29
29
|
def create(namespace)
|
30
|
-
#
|
30
|
+
# Reset the transaction if it was already completed but not cleared
|
31
|
+
if Thread.current[:appsignal_transaction]&.completed?
|
32
|
+
Thread.current[:appsignal_transaction] = nil
|
33
|
+
end
|
34
|
+
|
31
35
|
if Thread.current[:appsignal_transaction].nil?
|
32
36
|
# If not, start a new transaction
|
33
37
|
set_current_transaction(Appsignal::Transaction.new(namespace))
|
34
38
|
else
|
39
|
+
transaction = current
|
35
40
|
# Otherwise, log the issue about trying to start another transaction
|
36
41
|
Appsignal.internal_logger.warn(
|
37
42
|
"Trying to start new transaction, but a transaction " \
|
38
|
-
"with id '#{
|
39
|
-
"Using transaction '#{
|
43
|
+
"with id '#{transaction.transaction_id}' is already running. " \
|
44
|
+
"Using transaction '#{transaction.transaction_id}'."
|
40
45
|
)
|
41
46
|
|
42
47
|
# And return the current transaction instead
|
43
|
-
|
48
|
+
transaction
|
44
49
|
end
|
45
50
|
end
|
46
51
|
|
@@ -154,6 +159,7 @@ module Appsignal
|
|
154
159
|
@namespace = namespace
|
155
160
|
@paused = false
|
156
161
|
@discarded = false
|
162
|
+
@completed = false
|
157
163
|
@tags = {}
|
158
164
|
@breadcrumbs = []
|
159
165
|
@store = Hash.new { |hash, key| hash[key] = {} }
|
@@ -185,6 +191,11 @@ module Appsignal
|
|
185
191
|
false
|
186
192
|
end
|
187
193
|
|
194
|
+
# @api private
|
195
|
+
def completed?
|
196
|
+
@completed
|
197
|
+
end
|
198
|
+
|
188
199
|
# @api private
|
189
200
|
def complete
|
190
201
|
if discarded?
|
@@ -233,6 +244,7 @@ module Appsignal
|
|
233
244
|
|
234
245
|
sample_data if should_sample
|
235
246
|
|
247
|
+
@completed = true
|
236
248
|
@ext.complete
|
237
249
|
end
|
238
250
|
|
data/lib/appsignal/version.rb
CHANGED
data/lib/appsignal.rb
CHANGED
@@ -133,8 +133,8 @@ module Appsignal
|
|
133
133
|
_load_config!
|
134
134
|
_start_logger
|
135
135
|
|
136
|
-
if config.
|
137
|
-
if config.
|
136
|
+
if config.active_for_env?
|
137
|
+
if config.valid?
|
138
138
|
@started = true
|
139
139
|
internal_logger.info "Starting AppSignal #{Appsignal::VERSION} " \
|
140
140
|
"(#{$PROGRAM_NAME}, Ruby #{RUBY_VERSION}, #{RUBY_PLATFORM})"
|
@@ -153,10 +153,10 @@ module Appsignal
|
|
153
153
|
collect_environment_metadata
|
154
154
|
@config.freeze
|
155
155
|
else
|
156
|
-
internal_logger.info("Not starting,
|
156
|
+
internal_logger.info("Not starting, no valid config for this environment")
|
157
157
|
end
|
158
158
|
else
|
159
|
-
internal_logger.
|
159
|
+
internal_logger.info("Not starting, not active for #{config.env}")
|
160
160
|
end
|
161
161
|
nil
|
162
162
|
end
|
@@ -166,7 +166,7 @@ module Appsignal
|
|
166
166
|
# @param env_param [String, NilClass] Used by diagnose CLI to pass through
|
167
167
|
# the environment CLI option value.
|
168
168
|
# @api private
|
169
|
-
def _load_config!(env_param = nil, &block)
|
169
|
+
def _load_config!(env_param = nil, &block) # rubocop:disable Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity
|
170
170
|
# Ensure it's not an empty string if it's a value
|
171
171
|
proper_env_param = env_param&.to_s&.strip
|
172
172
|
# Unset it if it's an empty string
|
@@ -206,9 +206,17 @@ module Appsignal
|
|
206
206
|
# This will load the config/appsignal.yml file automatically
|
207
207
|
@config ||= Config.new(context.root_path, context.env)
|
208
208
|
end
|
209
|
+
|
209
210
|
# Allow a block to be given to customize the config and override any
|
210
211
|
# loaded config before it's validated.
|
211
212
|
block.call(config) if block_given?
|
213
|
+
|
214
|
+
# Apply any config overrides after the user config has been merged
|
215
|
+
config&.apply_overrides
|
216
|
+
|
217
|
+
# Skip validation if not configured as active for this environment
|
218
|
+
return unless config.active_for_env?
|
219
|
+
|
212
220
|
# Validate the config, if present
|
213
221
|
config&.validate
|
214
222
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appsignal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.5.
|
4
|
+
version: 4.5.14
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2025-05-
|
13
|
+
date: 2025-05-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: logger
|