fix(GODT-2708): fix dimensions event format + handling of ReportClicked event.

This commit is contained in:
Romain Le Jeune
2023-07-04 09:59:43 +00:00
parent 7e9a5934c5
commit 9c389e3007
11 changed files with 76 additions and 47 deletions

View File

@ -18,6 +18,7 @@
package configstatus
import (
"strconv"
"time"
)
@ -26,10 +27,10 @@ type ConfigSuccessValues struct {
}
type ConfigSuccessDimensions struct {
Autoconf string `json:"autoconf"`
ReportClick interface{} `json:"report_click"`
ReportSent interface{} `json:"report_sent"`
ClickedLink uint64 `json:"clicked_link"`
Autoconf string `json:"autoconf"`
ReportClick string `json:"report_click"`
ReportSent string `json:"report_sent"`
ClickedLink string `json:"clicked_link"`
}
type ConfigSuccessData struct {
@ -50,9 +51,9 @@ func (*ConfigSuccessBuilder) New(data *ConfigurationStatusData) ConfigSuccessDat
},
Dimensions: ConfigSuccessDimensions{
Autoconf: data.DataV1.Autoconf,
ReportClick: data.DataV1.ReportClick,
ReportSent: data.DataV1.ReportSent,
ClickedLink: data.DataV1.ClickedLink,
ReportClick: strconv.FormatBool(data.DataV1.ReportClick),
ReportSent: strconv.FormatBool(data.DataV1.ReportSent),
ClickedLink: data.clickedLinkToString(),
},
}
}