Skip to content

feat: honor environmentId from EvaluationSeriesContext#13

Merged
keelerm84 merged 2 commits intomainfrom
mk/sdk-2257/env-id
Apr 28, 2026
Merged

feat: honor environmentId from EvaluationSeriesContext#13
keelerm84 merged 2 commits intomainfrom
mk/sdk-2257/env-id

Conversation

@keelerm84
Copy link
Copy Markdown
Member

When TracingHookOptions::$environmentId is not configured, fall back to
EvaluationSeriesContext::$environmentId — populated by the LaunchDarkly
SDK from the X-Ld-Envid response header on polling fetches. Configuration
still takes precedence when both are set.

Removes the previous "options-only" limitation in the TracingHook
docblock and corresponding "known gap" note in the test file. Adds two
tests covering the series-context emission path and the precedence rule.

When TracingHookOptions::$environmentId is not configured, fall back to
EvaluationSeriesContext::$environmentId — populated by the LaunchDarkly
SDK from the X-Ld-Envid response header on polling fetches. Configuration
still takes precedence when both are set.

Removes the previous "options-only" limitation in the TracingHook
docblock and corresponding "known gap" note in the test file. Adds two
tests covering the series-context emission path and the precedence rule.
@keelerm84 keelerm84 requested a review from a team as a code owner April 27, 2026 19:04
@keelerm84 keelerm84 merged commit d761dcb into main Apr 28, 2026
34 of 35 checks passed
@keelerm84 keelerm84 deleted the mk/sdk-2257/env-id branch April 28, 2026 13:38
keelerm84 added a commit that referenced this pull request Apr 28, 2026
PR #13 wired TracingHook to fall back to
EvaluationSeriesContext::$environmentId when no value is configured on
TracingHookOptions, but the README still described that path as
unsupported.

- Update the environmentId option row to describe the precedence (option
  wins over series-context value).
- Update the feature_flag.set.id "Emitted when" row to acknowledge both
  sources.
- Drop the now-incorrect Known limitations entry; the addSpans casing
  note remains as the only limitation, demoted to a single paragraph.
keelerm84 added a commit that referenced this pull request Apr 28, 2026
🤖 I have created a release *beep* *boop*
---


## 0.1.0 (2026-04-28)


### Features

* add experimental addSpans option for per-evaluation spans
([#8](#8))
([36b04e4](36b04e4))
* add optional feature_flag attributes (value, variationIndex,
inExperiment)
([#6](#6))
([5f43c4f](5f43c4f))
* add TracingHook with required feature_flag span event
([#5](#5))
([1a3c016](1a3c016))
* add TracingHookOptions and attribute constants
([#4](#4))
([ae33939](ae33939))
* emit feature_flag.set.id when environmentId is configured
([#7](#7))
([26b6670](26b6670))
* honor environmentId from EvaluationSeriesContext
([#13](#13))
([d761dcb](d761dcb))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matthew Keeler <mkeeler@launchdarkly.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants