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(telemetry): record silent error #1585

Merged
merged 1 commit into from
Mar 7, 2024
Merged

fix(telemetry): record silent error #1585

merged 1 commit into from
Mar 7, 2024

Conversation

afiune
Copy link
Contributor

@afiune afiune commented Mar 7, 2024

Summary

We should not fail (in Honeycomb) when we can't check for updates, instead we are going to
send a silent error.

How did you test this change?

Built it and ran CLI locally, saw Honeycomb dev dataset.

Before

Screenshot 2024-03-07 at 9 13 41 AM

After

Screenshot 2024-03-07 at 10 28 47 AM

Signed-off-by: Salim Afiune Maya <afiune@lacework.net>
@afiune afiune requested a review from a team as a code owner March 7, 2024 18:40
Comment on lines +201 to +207
defer func() {
cli.Event.Feature = featDailyVerCheck
if err != nil {
cli.Event.FeatureData = map[string]interface{}{"silent_error": err.Error()}
}
cli.SendHoneyvent()
}()
Copy link
Contributor

Choose a reason for hiding this comment

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

Will the CLI always stay running long enough for this to send? Looks like the daily check is called in the post-execution of the root command.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup. We have workers in place to wait for this. https://github.com/lacework/go-sdk/blob/main/cli/cmd/honeyvent.go#L115-L124

Copy link
Contributor

Choose a reason for hiding this comment

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

Perfect!

@afiune afiune enabled auto-merge (squash) March 7, 2024 19:16
@afiune afiune merged commit fdabe92 into main Mar 7, 2024
11 checks passed
@afiune afiune deleted the afiune/silent_error branch March 7, 2024 20:06
@lacework-releng lacework-releng mentioned this pull request Mar 7, 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.

2 participants