Skip to content

Conversation

@kinyoklion
Copy link
Member

@kinyoklion kinyoklion commented Jan 23, 2025

During initialization the js-client-sdk does some context processing. This is an async operation which will add keys to anonymous contexts. Being as this doesn't happen synchronously within the initialization call there is a possibility that you register the telemetry SDK before that initialization is complete.

This PR updates the registration to attempt to wait for initialization. This is a larger window than we need to wait, but ensures that process will be complete.

@github-actions
Copy link
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Size: 19014 bytes
Size limit: 21000

@github-actions
Copy link
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Size: 15354 bytes
Size limit: 20000

@github-actions
Copy link
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Size: 19826 bytes
Size limit: 21000

@kinyoklion kinyoklion marked this pull request as ready for review January 23, 2025 19:42
@kinyoklion kinyoklion requested a review from a team as a code owner January 23, 2025 19:42
@kinyoklion kinyoklion merged commit d2ac2e2 into main Jan 23, 2025
23 checks passed
@kinyoklion kinyoklion deleted the rlamb/fix-registration-race-condition branch January 23, 2025 20:53
@github-actions github-actions bot mentioned this pull request Jan 23, 2025
kinyoklion pushed a commit that referenced this pull request Jan 23, 2025
🤖 I have created a release *beep* *boop*
---


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

##
[0.1.1](browser-telemetry-v0.1.0...browser-telemetry-v0.1.1)
(2025-01-23)


### Bug Fixes

* Fix race condition with client registration.
([#750](#750))
([d2ac2e2](d2ac2e2))
</details>

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

##
[0.8.0](server-sdk-ai-v0.7.1...server-sdk-ai-v0.8.0)
(2025-01-23)


### Features

* track timeToFirstToken in LDAIConfigTracker
([#749](#749))
([c97674f](c97674f))
</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.

4 participants