From d90c403f9a1d58d8aa559f0ea6009ed738bfde14 Mon Sep 17 00:00:00 2001 From: Ricardo Maraschini Date: Tue, 31 Oct 2023 10:16:39 +0100 Subject: [PATCH] chore: change metrics endpoint path the old endpoint isn't going to work anymore. --- pkg/metrics/sender.go | 2 +- pkg/metrics/sender_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/metrics/sender.go b/pkg/metrics/sender.go index 1c41d6f1c..1420b2671 100644 --- a/pkg/metrics/sender.go +++ b/pkg/metrics/sender.go @@ -41,7 +41,7 @@ type Sender struct { // Send sends an event to the metrics endpoint. func (s *Sender) Send(ctx context.Context, ev Event) { - url := fmt.Sprintf("%s/helmbin_metrics/%s", s.baseURL, ev.Title()) + url := fmt.Sprintf("%s/embedded_cluster_metrics/%s", s.baseURL, ev.Title()) payload, err := s.payload(ev) if err != nil { logrus.Debugf("unable to get payload for event %s: %s", ev.Title(), err) diff --git a/pkg/metrics/sender_test.go b/pkg/metrics/sender_test.go index 43f90eccb..25018399b 100644 --- a/pkg/metrics/sender_test.go +++ b/pkg/metrics/sender_test.go @@ -120,7 +120,7 @@ func TestSend(t *testing.T) { http.HandlerFunc( func(rw http.ResponseWriter, req *http.Request) { evname := reflect.TypeOf(tt.event).Name() - path := fmt.Sprintf("/helmbin_metrics/%s", evname) + path := fmt.Sprintf("/embedded_cluster_metrics/%s", evname) assert.Equal(t, req.URL.Path, path) assert.Equal(t, "POST", req.Method) received, err := io.ReadAll(req.Body)