Skip to content
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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Karlie-777
Copy link
Contributor

No description provided.

let ikey = _config.instrumentationKey;
if (!res.rejected && curCs) {
// replace cs with resolved values in case of circular promises
_config.connectionString = curCs;
Copy link
Contributor Author

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;
Copy link
Contributor Author

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) {
Copy link
Contributor Author

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

@Karlie-777 Karlie-777 changed the title [Main][Task]27939476: Initialization with iKey and endpointto be promises [Main][Task]27939476: Initialization with iKey and endpoint to be promises May 9, 2024
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.

None yet

1 participant