Skip to content

Commit

Permalink
chore: change metrics endpoint path
Browse files Browse the repository at this point in the history
the old endpoint isn't going to work anymore.
  • Loading branch information
ricardomaraschini committed Oct 31, 2023
1 parent 1a0911b commit d90c403
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/metrics/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pkg/metrics/sender_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d90c403

Please sign in to comment.