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

fix: Async telemetry startup #2885

Merged
merged 2 commits into from
Jun 16, 2023
Merged

fix: Async telemetry startup #2885

merged 2 commits into from
Jun 16, 2023

Conversation

deboer-tim
Copy link
Collaborator

What does this PR do?

When the user has enabled telemetry we currently block initialization until we are able to configure telemetry and send the first event out. This can delay startup unnecessarily if there are any DNS/network issues. I can't see any issues with just making this async; we already queue up pending events.

Screenshot/screencast of this PR

N/A

What issues does this PR fix or reference?

None, see background in issue #1633.

How to test this PR?

No visible change/error during startup. You can add a delay in configureTelemetry() to tell the difference, or logging to confirm that events are still being sent.

When the user has enabled telemetry we currently block initialization until we are able to configure telemetry and send the first event out. I can't see any issues with just making this async; we already queue up pending events.

Signed-off-by: Tim deBoer <git@tdeboer.ca>
@deboer-tim deboer-tim requested review from a team and benoitf as code owners June 15, 2023 19:46
@deboer-tim deboer-tim requested review from jeffmaury and lstocchi and removed request for a team June 15, 2023 19:46
if (this.isTelemetryEnabled()) {
await this.configureTelemetry();
this.configureTelemetry().catch((err: unknown) => {
console.log(`Error initializing telemetry: ${err}`);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably console.error

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, fixed.

Signed-off-by: Tim deBoer <git@tdeboer.ca>
@benoitf benoitf merged commit 9cb453d into main Jun 16, 2023
8 checks passed
@benoitf benoitf deleted the telemetry branch June 16, 2023 05:36
@podman-desktop-bot podman-desktop-bot added this to the 1.2.0 milestone Jun 16, 2023
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

3 participants