From 7d399947889cce8cee46f6a1a4369926b044a916 Mon Sep 17 00:00:00 2001 From: Danilo Pantani Date: Thu, 21 Dec 2023 12:40:16 -0300 Subject: [PATCH] fix(gacli): fix analytics event name (#3860) * fix analytics event name * use cmd with _ * add changelog --------- Co-authored-by: Pantani --- changelog.md | 1 + ignite/pkg/gacli/gacli.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 2489403bc2..ffc0cd541c 100644 --- a/changelog.md +++ b/changelog.md @@ -23,6 +23,7 @@ - [#3833](https://github.com/ignite/cli/pull/3833) Improve Cosmos SDK detection to support SDK forks - [#3849](https://github.com/ignite/cli/pull/3849) Add missing `tx.go` file by default and enable cli if autocli does not exist - [#3851](https://github.com/ignite/cli/pull/3851) Add missing ibc interfaces to chain client +- [#3860](https://github.com/ignite/cli/pull/3860) Fix analytics event name ## [`v28.0.0`](https://github.com/ignite/cli/releases/tag/v28.0.0) diff --git a/ignite/pkg/gacli/gacli.go b/ignite/pkg/gacli/gacli.go index df5e5ef9c9..4cf7f7ace5 100644 --- a/ignite/pkg/gacli/gacli.go +++ b/ignite/pkg/gacli/gacli.go @@ -5,6 +5,7 @@ import ( "encoding/json" "net/http" "net/url" + "strings" "time" "github.com/ignite/cli/v28/ignite/pkg/errors" @@ -115,7 +116,7 @@ func (c Client) SendMetric(metric Metric) error { return c.Send(Body{ ClientID: metric.SessionID, Events: []Event{{ - Name: metric.Cmd, + Name: strings.ReplaceAll(metric.Cmd, " ", "_"), Params: metric, }}, })