Skip to content

feat: Add plugin support for node. #880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 17, 2025

Conversation

kinyoklion
Copy link
Member

@kinyoklion kinyoklion commented Jun 9, 2025

This adds plugin support for the node server SDK.

Plugin support is leaf-SDK specific because plugins use the interface of the SDK. The interface of the SDK has slightly different capabilities based on implementation.

Unfortunately this isn't a simple problem to tackle with regards to organization. We could use composition with the common functionality being generic over the SDK interface. Doing so would require some breaking changes to all the SDK implementation, but could be worth it in the future.

For not though we have to settle for some complexity with the plugin interface being defined per-sdk and the call to the initialization code being per-sdk.

This was able to re-use the generic types and functions which means this isn't very much code.

This SDK had another complexity which is the event emitter. For convenient implementation of events we were using a mixin, but this mixin approach means we didn't have the full interface of the SDK available at the construction time of the SDK. So this PR moves the emitter implementation into the node client.

Copy link
Contributor

github-actions bot commented Jun 9, 2025

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 168949 bytes
Compressed size limit: 200000
Uncompressed size: 789074 bytes

Copy link
Contributor

github-actions bot commented Jun 9, 2025

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 24983 bytes
Compressed size limit: 26000
Uncompressed size: 122397 bytes

Copy link
Contributor

github-actions bot commented Jun 9, 2025

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 17636 bytes
Compressed size limit: 20000
Uncompressed size: 90259 bytes

Copy link
Contributor

github-actions bot commented Jun 9, 2025

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 21731 bytes
Compressed size limit: 25000
Uncompressed size: 74700 bytes

@kinyoklion kinyoklion marked this pull request as ready for review June 9, 2025 20:01
@kinyoklion kinyoklion requested a review from a team as a code owner June 9, 2025 20:01
@kinyoklion kinyoklion merged commit 6b7bf7e into main Jun 17, 2025
26 checks passed
@kinyoklion kinyoklion deleted the rlamb/o11y-197/add-node-plugin-support branch June 17, 2025 00:42
@github-actions github-actions bot mentioned this pull request Jun 17, 2025
kinyoklion pushed a commit that referenced this pull request Jun 17, 2025
🤖 I have created a release *beep* *boop*
---


<details><summary>akamai-edgeworker-sdk-common: 2.0.8</summary>

##
[2.0.8](akamai-edgeworker-sdk-common-v2.0.7...akamai-edgeworker-sdk-common-v2.0.8)
(2025-06-17)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-server-sdk-common bumped from ^2.15.2 to ^2.16.0
</details>

<details><summary>akamai-server-base-sdk: 3.0.8</summary>

##
[3.0.8](akamai-server-base-sdk-v3.0.7...akamai-server-base-sdk-v3.0.8)
(2025-06-17)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
* @launchdarkly/akamai-edgeworker-sdk-common bumped from ^2.0.7 to
^2.0.8
    * @launchdarkly/js-server-sdk-common bumped from ^2.15.2 to ^2.16.0
</details>

<details><summary>akamai-server-edgekv-sdk: 1.4.10</summary>

##
[1.4.10](akamai-server-edgekv-sdk-v1.4.9...akamai-server-edgekv-sdk-v1.4.10)
(2025-06-17)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
* @launchdarkly/akamai-edgeworker-sdk-common bumped from ^2.0.7 to
^2.0.8
    * @launchdarkly/js-server-sdk-common bumped from ^2.15.2 to ^2.16.0
</details>

<details><summary>browser-telemetry: 1.0.10</summary>

##
[1.0.10](browser-telemetry-v1.0.9...browser-telemetry-v1.0.10)
(2025-06-17)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/js-client-sdk bumped from 0.7.1 to 0.8.0
</details>

<details><summary>cloudflare-server-sdk: 2.7.8</summary>

##
[2.7.8](cloudflare-server-sdk-v2.7.7...cloudflare-server-sdk-v2.7.8)
(2025-06-17)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-server-sdk-common-edge bumped from 2.6.6 to 2.6.7
</details>

<details><summary>fastly-server-sdk: 0.1.8</summary>

##
[0.1.8](fastly-server-sdk-v0.1.7...fastly-server-sdk-v0.1.8)
(2025-06-17)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-server-sdk-common bumped from 2.15.2 to 2.16.0
</details>

<details><summary>jest: 0.1.9</summary>

##
[0.1.9](jest-v0.1.8...jest-v0.1.9)
(2025-06-17)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
* @launchdarkly/react-native-client-sdk bumped from ~10.10.3 to ~10.10.4
</details>

<details><summary>js-client-sdk: 0.8.0</summary>

##
[0.8.0](js-client-sdk-v0.7.1...js-client-sdk-v0.8.0)
(2025-06-17)


### Features

* Add support for an identify queue.
([#842](#842))
([78e9a5e](78e9a5e))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-client-sdk-common bumped from 1.14.1 to 1.15.0
</details>

<details><summary>js-client-sdk-common: 1.15.0</summary>

##
[1.15.0](js-client-sdk-common-v1.14.1...js-client-sdk-common-v1.15.0)
(2025-06-17)


### Features

* Add support for an identify queue.
([#842](#842))
([78e9a5e](78e9a5e))
</details>

<details><summary>js-server-sdk-common: 2.16.0</summary>

##
[2.16.0](js-server-sdk-common-v2.15.2...js-server-sdk-common-v2.16.0)
(2025-06-17)


### Features

* Add plugin support for node.
([#880](#880))
([6b7bf7e](6b7bf7e))
</details>

<details><summary>js-server-sdk-common-edge: 2.6.7</summary>

##
[2.6.7](js-server-sdk-common-edge-v2.6.6...js-server-sdk-common-edge-v2.6.7)
(2025-06-17)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-server-sdk-common bumped from 2.15.2 to 2.16.0
</details>

<details><summary>node-server-sdk: 9.10.0</summary>

##
[9.10.0](node-server-sdk-v9.9.2...node-server-sdk-v9.10.0)
(2025-06-17)


### Features

* Add plugin support for node.
([#880](#880))
([6b7bf7e](6b7bf7e))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-server-sdk-common bumped from 2.15.2 to 2.16.0
</details>

<details><summary>node-server-sdk-dynamodb: 6.2.12</summary>

##
[6.2.12](node-server-sdk-dynamodb-v6.2.11...node-server-sdk-dynamodb-v6.2.12)
(2025-06-17)


### Bug Fixes

* uncaught DynamoDB exception
([#888](#888))
([91ff683](91ff683))


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/node-server-sdk bumped from 9.9.2 to 9.10.0
  * peerDependencies
    * @launchdarkly/node-server-sdk bumped from >=9.4.3 to >=9.10.0
</details>

<details><summary>node-server-sdk-otel: 1.3.0</summary>

##
[1.3.0](node-server-sdk-otel-v1.2.2...node-server-sdk-otel-v1.3.0)
(2025-06-17)


### Features

* Update OTEL tracing hook with latest conventions.
([#887](#887))
([245f1a3](245f1a3))


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/node-server-sdk bumped from 9.9.2 to 9.10.0
  * peerDependencies
    * @launchdarkly/node-server-sdk bumped from >=9.4.3 to >=9.10.0
</details>

<details><summary>node-server-sdk-redis: 4.2.12</summary>

##
[4.2.12](node-server-sdk-redis-v4.2.11...node-server-sdk-redis-v4.2.12)
(2025-06-17)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/node-server-sdk bumped from 9.9.2 to 9.10.0
  * peerDependencies
    * @launchdarkly/node-server-sdk bumped from >=9.4.3 to >=9.10.0
</details>

<details><summary>react-native-client-sdk: 10.10.4</summary>

##
[10.10.4](react-native-client-sdk-v10.10.3...react-native-client-sdk-v10.10.4)
(2025-06-17)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-client-sdk-common bumped from 1.14.1 to 1.15.0
</details>

<details><summary>server-sdk-ai: 0.9.9</summary>

##
[0.9.9](server-sdk-ai-v0.9.8...server-sdk-ai-v0.9.9)
(2025-06-17)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/js-server-sdk-common bumped from 2.15.2 to 2.16.0
  * peerDependencies
    * @launchdarkly/js-server-sdk-common bumped from 2.x to 2.16.0
</details>

<details><summary>vercel-server-sdk: 1.3.31</summary>

##
[1.3.31](vercel-server-sdk-v1.3.30...vercel-server-sdk-v1.3.31)
(2025-06-17)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @launchdarkly/js-server-sdk-common-edge bumped from 2.6.6 to 2.6.7
</details>

---
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>
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