From 52276042bed9e7b92a50cf27e9087ab0d662af61 Mon Sep 17 00:00:00 2001 From: Ricardo Maraschini Date: Tue, 3 Oct 2023 19:52:51 +0200 Subject: [PATCH] chore: renamed event properties --- pkg/metrics/events.go | 4 ++-- pkg/metrics/reporter.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/metrics/events.go b/pkg/metrics/events.go index 0fd8b116e..897843ee3 100644 --- a/pkg/metrics/events.go +++ b/pkg/metrics/events.go @@ -73,7 +73,7 @@ func (e UpgradeFailed) Title() string { // JoinStarted event is send back home when a node join starts. type JoinStarted struct { ClusterID uuid.UUID `json:"clusterID"` - Name string `json:"name"` + NodeName string `json:"nodeName"` } // Title returns the name of the event. @@ -92,7 +92,7 @@ func (e JoinSucceeded) Title() string { // JoinFailed event is send back home when a node join fails. type JoinFailed struct { ClusterID uuid.UUID `json:"clusterID"` - Name string `json:"name"` + NodeName string `json:"nodeName"` Reason string `json:"reason"` } diff --git a/pkg/metrics/reporter.go b/pkg/metrics/reporter.go index 31b1ed446..9c88b6086 100644 --- a/pkg/metrics/reporter.go +++ b/pkg/metrics/reporter.go @@ -129,13 +129,13 @@ func ReportJoinSucceeded(ctx context.Context, clusterID uuid.UUID) { } // ReportJoinFailed reports that a join has failed. -func ReportJoinFailed(ctx context.Context, clusterID uuid.UUID, err error) { +func ReportJoinFailed(ctx context.Context, clusterID uuid.UUID, exterr error) { hostname, err := os.Hostname() if err != nil { logrus.Warnf("unable to get hostname: %s", err) hostname = "unknown" } - Send(ctx, JoinFailed{clusterID, hostname, err.Error()}) + Send(ctx, JoinFailed{clusterID, hostname, exterr.Error()}) } // ReportApplyStarted decides if we are going to report an InstallationStarted