launchdarkly-server-sdk-otel 1.1.3 → 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: 8d089023c628482fe97d89d11f64cca328cf0d7b8daf2070dd47ea181e7db810
4
- data.tar.gz: 7e39021d979dcc6c3481e1efc60690303bb56880f8fb25c2c64ffdaca8b9583c
3
+ metadata.gz: e2cf69e7b30f5c1e8f12107b6c1c25765b8bdaf029d516c0097c424b2a35d649
4
+ data.tar.gz: 5f0f07229ae611c34b5b299744f5684a5a067e639b1436309df95eb09e65b699
5
5
  SHA512:
6
- metadata.gz: 9333a87c6412f62fbf8c26a0c7c510fcd305295e7f70f75cc11b0df3a3425176ce6ae6cef7477b32ac6672df6ff0087d0aa92d7de383766b78ca2c1eb1afea35
7
- data.tar.gz: bb83ad2382bbbb76605157d97c41028a24d4c6875dc09d8632854cfd3b85076f09516395e7e3a14dc72d44007ebcc401576cde64cd8ff64d6da06209d3908756
6
+ metadata.gz: af280b4c6ff05094f7537bd4534a4ce9a86ff3b1bf1fc5b4770f0b536872ccf2218426673b1507d266083cc0264bf4415cfb3cf3296f99187710306e2c139c65
7
+ data.tar.gz: b8c91e6066df3c01f3a9f179fea4e6e0b173852f1f2cabf6a67be839478cc3a3f9149841a153aa725a32e14b2157e3c2983ce78a74d482df03fa154e79a63b3a
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "1.1.3"
2
+ ".": "1.2.0"
3
3
  }
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
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
+
3
10
  ## [1.1.3](https://github.com/launchdarkly/ruby-server-sdk-otel/compare/1.1.2...1.1.3) (2026-11-20)
4
11
 
5
12
 
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.3
12
+ VERSION=1.2.0
13
13
  ```
14
14
  <!-- x-release-please-end -->
15
15
 
@@ -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.3' # x-release-please-version
5
+ VERSION = '1.2.0' # x-release-please-version
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +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.3
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - LaunchDarkly
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-11-20 00:00:00.000000000 Z
11
+ date: 2026-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: launchdarkly-server-sdk