feat: report event source headers on open#33
Merged
abarker-launchdarkly merged 3 commits intomainfrom Apr 14, 2025
Merged
Conversation
kinyoklion
approved these changes
Apr 14, 2025
Member
kinyoklion
left a comment
There was a problem hiding this comment.
Code looks good. I think we need to update the readme, specifically the extensions compared to w3c.
abarker-launchdarkly
pushed a commit
that referenced
this pull request
Apr 14, 2025
🤖 I have created a release *beep* *boop* --- ## [2.1.0](2.0.3...2.1.0) (2025-04-14) ### Features * report event source headers on open ([#33](#33)) ([e8539f3](e8539f3)) --- 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>
3 tasks
abarker-launchdarkly
added a commit
to launchdarkly/js-core
that referenced
this pull request
Apr 16, 2025
**Requirements** - [x] I have added test coverage for new or changed functionality - [x] I have followed the repository's [pull request submission guidelines](../blob/main/CONTRIBUTING.md#submitting-pull-requests) - [x] I have validated my changes against all supported platform versions **Describe the solution you've provided** If present, `environmentId` is now passed to the HookRunner in the evaluation series. For streaming connections: - Response headers are now attached to the `open` event (launchdarkly/js-eventsource#33) - `StreamingProcessor` passes these headers to the stream listeners via `processJson`. The listener for the PUT event extracts the `environmentId` from the headers and passes this as initialization metadata to the underlying feature store. For polling connections: - `PollingProcessor` retrieves the response headers via the underlying `Requestor` and extracts the `environmentId` from the headers and passes this as initialization metadata to the underlying feature store. LDClient will then call `getInitMetaData()` on the underlying feature store (if the feature store supports it) when executing a hook and pass `environmentId` in the execution series data. Currently only `InMemoryFeatureStore` has been modified to support initialization metadata. This functionality can be added to other feature stores by modifying `init()` to accept the optional `initMetadata` parameter and implementing the optional `getInitMetadata()` method.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.