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

Use new error telemetry API #435

Merged
merged 9 commits into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/operator/controllers/pod_reconcilers/pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func (p *PodWatcher) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu
logrus.Debugf("Reconciling due to pod change: %s", req.Name)
pod := v1.Pod{}
err := p.Get(ctx, req.NamespacedName, &pod)

if k8serrors.IsNotFound(err) {
logrus.Debugf("Pod was deleted")
return ctrl.Result{}, nil
Expand Down
19 changes: 10 additions & 9 deletions src/operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,16 @@ func main() {
if viper.GetBool(operatorconfig.DebugLogKey) {
logrus.SetLevel(logrus.DebugLevel)
}
errorreporter.Init("intents-operator", version.Version(), viper.GetString(operatorconfig.TelemetryErrorsAPIKeyKey))

signalHandlerCtx := ctrl.SetupSignalHandler()

clusterUID, err := clusterutils.GetOrCreateClusterUID(signalHandlerCtx)
if err != nil {
logrus.WithError(err).Panic("Failed obtaining cluster ID")
}
componentinfo.SetGlobalContextId(telemetrysender.Anonymize(clusterUID))

errorreporter.Init(telemetriesgql.TelemetryComponentTypeIntentsOperator, version.Version())
defer errorreporter.AutoNotify()
shared.RegisterPanicHandlers()

Expand Down Expand Up @@ -190,14 +199,6 @@ func main() {
if err != nil {
logrus.WithError(err).Panic(err, "unable to start manager")
}
signalHandlerCtx := ctrl.SetupSignalHandler()

clusterUID, err := clusterutils.GetOrCreateClusterUID(signalHandlerCtx)
if err != nil {
logrus.WithError(err).Panic("Failed obtaining cluster ID")
}
componentinfo.SetGlobalContextId(telemetrysender.Anonymize(clusterUID))
componentinfo.SetGlobalVersion(version.Version())

directClient, err := client.New(ctrl.GetConfigOrDie(), client.Options{Scheme: mgr.GetScheme()})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/awsagent/roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ func (a *Agent) generateTrustPolicy(namespaceName, accountName string) (string,
return "", errors.Wrap(err)
}

return string(serialized), errors.Wrap(err)
return string(serialized), nil
}

func (a *Agent) generateTrustPolicyForRolesAnywhere(namespaceName, accountName string) (string, error) {
Expand Down
112 changes: 0 additions & 112 deletions src/shared/logrus_bugsnag/logrus.go

This file was deleted.

Loading
Loading