feat: support async api key fetching (browser SDK)#211
Conversation
🦋 Changeset detectedLatest commit: 3303647 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| if (typeof apiKey === 'function') { | ||
| apiKey() | ||
| .then((resolved) => { | ||
| initWithApiKey(resolved); |
There was a problem hiding this comment.
this is not going to work because of
hyperdx-js/packages/otel-web/src/index.ts
Lines 513 to 517 in 3303647
There was a problem hiding this comment.
also are there any implications of initialising > 1 times?
I thought about calling Rum.deinit() before reinitializing, but not sure about the impact
There was a problem hiding this comment.
my understanding is the initWithApiKey will be called once the api key is fetched. for reinit, I don't think the api is exposed on the browser sdk side. what's the use case?
Ref: HDX-3042