launchdarkly-server-sdk-otel 1.1.2 → 1.2.0

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: fec2b48bdca2958b0049e343905f479741aa191f200eab72a3c0fa54767dc444
4
- data.tar.gz: 80bcd06df3797502b1a21268ab4cf3d31e20e85d2b5d69949ea5675db6ffcd52
3
+ metadata.gz: e2cf69e7b30f5c1e8f12107b6c1c25765b8bdaf029d516c0097c424b2a35d649
4
+ data.tar.gz: 5f0f07229ae611c34b5b299744f5684a5a067e639b1436309df95eb09e65b699
5
5
  SHA512:
6
- metadata.gz: fc267ba931e252cd737b6dbe6ef5e96210936795283273f570c4d3b98a5242c85a2a3756bb0f5d132d8296e2fce07978ea882f659db3b8ddd77337ff9633d25e
7
- data.tar.gz: 7889606131e5ae9834cbe6b29168183cdaad227ded276622ea25d5482c91817d5bcb4fd17bcc6b7886dcfbc01f2b360d320b1ce32e435cd97ae080c47dc3f0ff
6
+ metadata.gz: af280b4c6ff05094f7537bd4534a4ce9a86ff3b1bf1fc5b4770f0b536872ccf2218426673b1507d266083cc0264bf4415cfb3cf3296f99187710306e2c139c65
7
+ data.tar.gz: b8c91e6066df3c01f3a9f179fea4e6e0b173852f1f2cabf6a67be839478cc3a3f9149841a153aa725a32e14b2157e3c2983ce78a74d482df03fa154e79a63b3a
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "1.1.2"
2
+ ".": "1.2.0"
3
3
  }
data/.rubocop.yml CHANGED
@@ -4,7 +4,7 @@ plugins:
4
4
  - rubocop-rspec
5
5
 
6
6
  AllCops:
7
- TargetRubyVersion: 3.0
7
+ TargetRubyVersion: 3.1
8
8
  Include:
9
9
  - lib/**/*.rb
10
10
  - spec/**/*.rb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.2.0](https://github.com/launchdarkly/ruby-server-sdk-otel/compare/1.1.3...1.2.0) (2026-12-04)
4
+
5
+
6
+ ### Features
7
+
8
+ * Use the environment ID from the evaluation series context ([#40](https://github.com/launchdarkly/ruby-server-sdk-otel/issues/40)) ([b1cc004](https://github.com/launchdarkly/ruby-server-sdk-otel/commit/b1cc004f3a40ce0ac51a6bbbfa3977f78b6849f4))
9
+
10
+ ## [1.1.3](https://github.com/launchdarkly/ruby-server-sdk-otel/compare/1.1.2...1.1.3) (2026-11-20)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * Bump minimum to ruby 3.1 ([#31](https://github.com/launchdarkly/ruby-server-sdk-otel/issues/31)) ([d616911](https://github.com/launchdarkly/ruby-server-sdk-otel/commit/d616911908984828e24cd972776ff84224102c70))
16
+
3
17
  ## [1.1.2](https://github.com/launchdarkly/ruby-server-sdk-otel/compare/1.1.1...1.1.2) (2026-06-04)
4
18
 
5
19
 
data/PROVENANCE.md CHANGED
@@ -9,7 +9,7 @@ To verify build provenance attestations, we recommend using the [GitHub CLI `att
9
9
  <!-- x-release-please-start-version -->
10
10
  ```
11
11
  # Set the version of the library to verify
12
- VERSION=1.1.2
12
+ VERSION=1.2.0
13
13
  ```
14
14
  <!-- x-release-please-end -->
15
15
 
data/README.md CHANGED
@@ -16,7 +16,7 @@ LaunchDarkly overview
16
16
  Supported Ruby versions
17
17
  -----------------------
18
18
 
19
- This version of the library has a minimum Ruby version of 3.0.0, or 9.4.0 for JRuby.
19
+ While this version of the library requires Ruby 3.1.0 or later (or JRuby 9.4.0 or later), you should use the latest patched version of a supported Ruby or JRuby release.
20
20
 
21
21
  Getting started
22
22
  -----------
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.summary = "LaunchDarkly SDK OTEL integration"
12
12
  spec.description = "LaunchDarkly SDK OTEL integration for the Ruby server side SDK"
13
13
  spec.homepage = "https://github.com/launchdarkly/ruby-server-sdk-otel"
14
- spec.required_ruby_version = ">= 3.0.0"
14
+ spec.required_ruby_version = ">= 3.1.0"
15
15
 
16
16
  spec.metadata["homepage_uri"] = spec.homepage
17
17
  spec.metadata["source_code_uri"] = "https://github.com/launchdarkly/ruby-server-sdk-otel"
@@ -33,7 +33,13 @@ module LaunchDarkly
33
33
  attr_reader :include_variant
34
34
 
35
35
  #
36
- # Optional environment ID to include as feature_flag.set.id attribute.
36
+ # Optional environment ID to include as the feature_flag.set.id attribute.
37
+ #
38
+ # SDK versions which report the environment ID to hooks do so automatically, so this option is only required
39
+ # for SDK versions which do not. When both are available, this option takes precedence.
40
+ #
41
+ # The value must be a non-empty string. Any other value is ignored, which is equivalent to not specifying an
42
+ # environment ID at all.
37
43
  #
38
44
  # @return [String, nil]
39
45
  #
@@ -150,12 +156,20 @@ module LaunchDarkly
150
156
 
151
157
  event['feature_flag.result.variationIndex'] = detail.variation_index if detail.variation_index
152
158
 
153
- event['feature_flag.set.id'] = @config.environment_id if @config.environment_id
159
+ environment_id = @config.environment_id || series_environment_id(evaluation_series_context)
160
+ event['feature_flag.set.id'] = environment_id if environment_id
154
161
 
155
162
  span.add_event('feature_flag', attributes: event)
156
163
 
157
164
  data
158
165
  end
166
+
167
+ private def series_environment_id(evaluation_series_context)
168
+ return nil unless evaluation_series_context.respond_to?(:environment_id)
169
+
170
+ environment_id = evaluation_series_context.environment_id
171
+ environment_id if environment_id.is_a?(String) && !environment_id.empty?
172
+ end
159
173
  end
160
174
  end
161
175
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module LaunchDarkly
4
4
  module Otel
5
- VERSION = '1.1.2' # x-release-please-version
5
+ VERSION = '1.2.0' # x-release-please-version
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: launchdarkly-server-sdk-otel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - LaunchDarkly
8
+ autorequire:
8
9
  bindir: exe
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2026-12-04 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: launchdarkly-server-sdk
@@ -159,6 +160,7 @@ metadata:
159
160
  homepage_uri: https://github.com/launchdarkly/ruby-server-sdk-otel
160
161
  source_code_uri: https://github.com/launchdarkly/ruby-server-sdk-otel
161
162
  changelog_uri: https://github.com/launchdarkly/ruby-server-sdk-otel/blob/main/CHANGELOG.md
163
+ post_install_message:
162
164
  rdoc_options: []
163
165
  require_paths:
164
166
  - lib
@@ -166,14 +168,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
166
168
  requirements:
167
169
  - - ">="
168
170
  - !ruby/object:Gem::Version
169
- version: 3.0.0
171
+ version: 3.1.0
170
172
  required_rubygems_version: !ruby/object:Gem::Requirement
171
173
  requirements:
172
174
  - - ">="
173
175
  - !ruby/object:Gem::Version
174
176
  version: '0'
175
177
  requirements: []
176
- rubygems_version: 3.6.9
178
+ rubygems_version: 3.3.27
179
+ signing_key:
177
180
  specification_version: 4
178
181
  summary: LaunchDarkly SDK OTEL integration
179
182
  test_files: []