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
[Main][Task]27939476: Initialization with iKey and endpoint to be promises #2340
base: main
Are you sure you want to change the base?
Conversation
let ikey = _config.instrumentationKey; | ||
if (!res.rejected && curCs) { | ||
// replace cs with resolved values in case of circular promises | ||
_config.connectionString = curCs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to set connection string to be string to avoid future promise calls
@@ -268,6 +270,12 @@ export class Sender extends BaseTelemetryPlugin implements IChannelControls { | |||
} | |||
}); | |||
|
|||
if (core.activeStatus() === ActiveStatus.PENDING) { | |||
// waiting for core promises to be resolved | |||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if core active status is pending, do nothing
|
||
if (isNullOrUndefined(ikey)) { | ||
_activeStatus = ActiveStatus.INACTIVE; | ||
if (!_isInitialized) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only throw error during first initialization, not during config changes
No description provided.