-
Notifications
You must be signed in to change notification settings - Fork 499
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
feat: Send telemetry about failed COPY FROMs #1050
Conversation
Depends on new SDK with cloudquery/cq-provider-sdk#395 |
@irmatov looks like you need to update a test for CI to pass https://github.com/cloudquery/cloudquery/runs/7177084872?check_suite_focus=true#step:8:269 |
Closes cloudquery/cloudquery-issues#374
@erezrokah looks like a flaky test. it worked after rebase & push. |
internal/analytics/client.go
Outdated
@@ -162,7 +160,7 @@ func GetCookieId() uuid.UUID { | |||
return id | |||
} | |||
|
|||
func Capture(eventType string, providers registry.Providers, data Message, diags diag.Diagnostics, extra ...interface{}) { | |||
func Capture(eventType string, providers registry.Providers, data Message, extra ...interface{}) { |
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.
Why not keep diags
param as-is but pass in summarized versions? Repeating the "diagnostics"
string (and remembering to set success
) as extra
is prone to errors (and forgetting). If you don't have any (sendProviderTelemetryEvents
) could just pass nil
.
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.
Can't pass summarized version as it still would introduce core
import into the analytics and create an import loop. Moved SummarizeDiagnostics
into the analytics package.
@@ -0,0 +1,39 @@ | |||
package analytics |
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.
moved from core without any changes
@@ -40,32 +32,6 @@ func (d *SentryDiagnostic) IsSentryDiagnostic() (bool, map[string]string, bool) | |||
return true, d.Tags, d.Ignore | |||
} | |||
|
|||
func SummarizeDiagnostics(diags diag.Diagnostics) DiagnosticsSummary { |
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.
moved into analytics package to break import cycle.
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.
LGTM with nits :)
Synced local file(s) with [cloudquery/.github](https://github.com/cloudquery/.github). --- This PR was created automatically by the [repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action) workflow run [#2489093639](https://github.com/cloudquery/.github/actions/runs/2489093639)
Closes cloudquery/cloudquery-issues#374