launchdarkly-server-sdk 8.8.3-java → 8.9.0-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 59c552eae93a7ae544e129a1f14565cf96a8bab492b35b90d2a4c73792d7a5f5
4
- data.tar.gz: 7b2b170dccd64ba24608e11fd26ab82fac898a61542a1e3279f223daa3dc4012
3
+ metadata.gz: 9461ca8bff58d47677e9209382c92cebdd7fa68d64e61cab5b938857a5b6ebba
4
+ data.tar.gz: cacb2d985cb3ac490d9b518affa546ffd7551f2a5696dbf754b21f7cd19fa8c7
5
5
  SHA512:
6
- metadata.gz: 2884b93afa6e27cacc8e2e7271b853348facd526c351c7aabea690cab8f46b9f72b00279dfc04ed503a6e8a0b8f39b9e9dd814085a520e2c126ccc9cdf04a97b
7
- data.tar.gz: 7719ede3528f9400536cc06e2543bc1ffaabaef02d6ccb3389efdd33fbc9f4b7162f19838e4a20c66336cf6d461be75aea9051b2efb4094e2dcec9f07af6cf56
6
+ metadata.gz: d19da9233a4f26438fb788c9dfb264b0d82bfd697e556f7f92ae7e51852a87a378d2bba9a62b6214e707d394b51972bbbbf0135cc7321019d12bf2df17006042
7
+ data.tar.gz: 249ea71e0b58245af526d29b2202bc39ca5ef5cbb5b1487e09714940dfbced30d8291701f5b5e0911deaf5cced1647f7ece061d604da699367f0948934d85e5e
@@ -243,17 +243,17 @@ module LaunchDarkly
243
243
  @events_in_last_batch = 0
244
244
 
245
245
  outbox = EventBuffer.new(config.capacity, config.logger)
246
- flush_workers = NonBlockingThreadPool.new(MAX_FLUSH_WORKERS)
246
+ flush_workers = NonBlockingThreadPool.new(MAX_FLUSH_WORKERS, 'LD/EventDispatcher/FlushWorkers')
247
247
 
248
248
  if !@diagnostic_accumulator.nil?
249
- diagnostic_event_workers = NonBlockingThreadPool.new(1)
249
+ diagnostic_event_workers = NonBlockingThreadPool.new(1, 'LD/EventDispatcher/DiagnosticEventWorkers')
250
250
  init_event = @diagnostic_accumulator.create_init_event(config)
251
251
  send_diagnostic_event(init_event, diagnostic_event_workers)
252
252
  else
253
253
  diagnostic_event_workers = nil
254
254
  end
255
255
 
256
- Thread.new { main_loop(inbox, outbox, flush_workers, diagnostic_event_workers) }
256
+ Thread.new { main_loop(inbox, outbox, flush_workers, diagnostic_event_workers) }.name = "LD/EventDispatcher#main_loop"
257
257
  end
258
258
 
259
259
  private
@@ -508,7 +508,7 @@ module LaunchDarkly
508
508
  out = {
509
509
  kind: MIGRATION_OP_KIND,
510
510
  creationDate: event.timestamp,
511
- contextKeys: event.context.keys,
511
+ context: @context_filter.filter_redact_anonymous(event.context),
512
512
  operation: event.operation.to_s,
513
513
  evaluation: {
514
514
  key: event.key,
@@ -577,7 +577,7 @@ module LaunchDarkly
577
577
  key: event.key,
578
578
  }
579
579
  out[:data] = event.data unless event.data.nil?
580
- out[:contextKeys] = event.context.keys
580
+ out[:context] = @context_filter.filter_redact_anonymous(event.context)
581
581
  out[:metricValue] = event.metric_value unless event.metric_value.nil?
582
582
  out
583
583
 
@@ -24,7 +24,7 @@ module LaunchDarkly
24
24
 
25
25
  unless @store.nil?
26
26
  @cache = ExpiringCache.new(big_segments_config.context_cache_size, big_segments_config.context_cache_time)
27
- @poll_worker = RepeatingTask.new(big_segments_config.status_poll_interval, 0, -> { poll_store_and_update_status }, logger)
27
+ @poll_worker = RepeatingTask.new(big_segments_config.status_poll_interval, 0, -> { poll_store_and_update_status }, logger, 'LD/BigSegments#status')
28
28
  @poll_worker.start
29
29
  end
30
30
  end
@@ -216,6 +216,7 @@ module LaunchDarkly
216
216
  end
217
217
  end
218
218
  end
219
+ @thread.name = "LD/FileDataSource"
219
220
  end
220
221
 
221
222
  def stop
@@ -188,6 +188,9 @@ module LaunchDarkly
188
188
  auth_handler = Thread.new { authoritative_result = authoritative.run }
189
189
  nonauth_handler = Thread.new { nonauthoritative_result = nonauthoritative.run }
190
190
 
191
+ auth_handler.name = "LD/Migrator#auth_handler"
192
+ nonauth_handler.name = "LD/Migrator#nonauth_handler"
193
+
191
194
  auth_handler.join()
192
195
  nonauth_handler.join()
193
196
  when LaunchDarkly::Migrations::MigratorBuilder::EXECUTION_RANDOM && @sampler.sample(2)
@@ -9,12 +9,12 @@ module LaunchDarkly
9
9
  include LaunchDarkly::Interfaces::Migrations::OpTracker
10
10
 
11
11
  #
12
- # @param logger [Logger] logger
13
- # @param key [string] key
14
- # @param flag [LaunchDarkly::Impl::Model::FeatureFlag] flag
15
- # @param context [LaunchDarkly::LDContext] context
16
- # @param detail [LaunchDarkly::EvaluationDetail] detail
17
- # @param default_stage [Symbol] default_stage
12
+ # @param logger [Logger]
13
+ # @param key [string]
14
+ # @param flag [LaunchDarkly::Impl::Model::FeatureFlag]
15
+ # @param context [LaunchDarkly::LDContext]
16
+ # @param detail [LaunchDarkly::EvaluationDetail]
17
+ # @param default_stage [Symbol]
18
18
  #
19
19
  def initialize(logger, key, flag, context, detail, default_stage)
20
20
  @logger = logger
@@ -5,13 +5,16 @@ require "concurrent/atomics"
5
5
  module LaunchDarkly
6
6
  module Impl
7
7
  class RepeatingTask
8
- def initialize(interval, start_delay, task, logger)
8
+ attr_reader :name
9
+
10
+ def initialize(interval, start_delay, task, logger, name)
9
11
  @interval = interval
10
12
  @start_delay = start_delay
11
13
  @task = task
12
14
  @logger = logger
13
15
  @stopped = Concurrent::AtomicBoolean.new(false)
14
16
  @worker = nil
17
+ @name = name
15
18
  end
16
19
 
17
20
  def start
@@ -31,6 +34,8 @@ module LaunchDarkly
31
34
  end
32
35
  end
33
36
  end
37
+
38
+ @worker.name = @name
34
39
  end
35
40
 
36
41
  def stop
@@ -99,7 +99,7 @@ module LaunchDarkly
99
99
 
100
100
  @logger.warn("Detected persistent store unavailability; updates will be cached until it recovers.")
101
101
 
102
- task = Impl::RepeatingTask.new(0.5, 0, -> { self.check_availability }, @logger)
102
+ task = Impl::RepeatingTask.new(0.5, 0, -> { self.check_availability }, @logger, 'LD/StoreWrapper#check_availability')
103
103
 
104
104
  @mutex.synchronize do
105
105
  @poller = task
@@ -8,9 +8,9 @@ module LaunchDarkly
8
8
  # than blocking. Also provides a way to wait for all jobs to finish without shutting down.
9
9
  # @private
10
10
  class NonBlockingThreadPool
11
- def initialize(capacity)
11
+ def initialize(capacity, name = 'LD/NonBlockingThreadPool')
12
12
  @capacity = capacity
13
- @pool = Concurrent::FixedThreadPool.new(capacity)
13
+ @pool = Concurrent::FixedThreadPool.new(capacity, name: name)
14
14
  @semaphore = Concurrent::Semaphore.new(capacity)
15
15
  end
16
16
 
@@ -13,7 +13,7 @@ module LaunchDarkly
13
13
  @initialized = Concurrent::AtomicBoolean.new(false)
14
14
  @started = Concurrent::AtomicBoolean.new(false)
15
15
  @ready = Concurrent::Event.new
16
- @task = Impl::RepeatingTask.new(@config.poll_interval, 0, -> { self.poll }, @config.logger)
16
+ @task = Impl::RepeatingTask.new(@config.poll_interval, 0, -> { self.poll }, @config.logger, 'LD/PollingDataSource')
17
17
  end
18
18
 
19
19
  def initialized?
@@ -1,3 +1,3 @@
1
1
  module LaunchDarkly
2
- VERSION = "8.8.3" # x-release-please-version
2
+ VERSION = "8.9.0" # x-release-please-version
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: launchdarkly-server-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.8.3
4
+ version: 8.9.0
5
5
  platform: java
6
6
  authors:
7
7
  - LaunchDarkly
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-02-24 00:00:00.000000000 Z
10
+ date: 2025-03-13 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: aws-sdk-dynamodb
@@ -245,14 +245,14 @@ dependencies:
245
245
  requirements:
246
246
  - - '='
247
247
  - !ruby/object:Gem::Version
248
- version: 2.2.2
248
+ version: 2.2.3
249
249
  type: :runtime
250
250
  prerelease: false
251
251
  version_requirements: !ruby/object:Gem::Requirement
252
252
  requirements:
253
253
  - - '='
254
254
  - !ruby/object:Gem::Version
255
- version: 2.2.2
255
+ version: 2.2.3
256
256
  - !ruby/object:Gem::Dependency
257
257
  name: observer
258
258
  requirement: !ruby/object:Gem::Requirement