diff --git a/api4/license.go b/api4/license.go index 8d41113e70..143e84bea0 100644 --- a/api4/license.go +++ b/api4/license.go @@ -403,6 +403,12 @@ func requestTrueUpReview(c *Context, w http.ResponseWriter, r *http.Request) { // Send telemetry data. json.Unmarshal(reviewProfileJson, &telemetryProperties) + delete(telemetryProperties, "plugins") + plugins := reviewProfile.Plugins.ToMap() + for pluginName, pluginValue := range plugins { + telemetryProperties[pluginName] = pluginValue + } + telemetryService := c.App.Srv().GetTelemetryService() telemetryService.SendTelemetry(model.TrueUpReviewTelemetryName, telemetryProperties) diff --git a/model/true_up_review_profile.go b/model/true_up_review_profile.go index 54cfb3f9af..8c72ffad71 100644 --- a/model/true_up_review_profile.go +++ b/model/true_up_review_profile.go @@ -24,3 +24,12 @@ type TrueUpReviewPlugins struct { ActivePluginNames []string `json:"active_plugin_names"` InactivePluginNames []string `json:"inactive_plugin_names"` } + +func (t *TrueUpReviewPlugins) ToMap() map[string]any { + return map[string]any{ + "total_active_plugins": t.TotalActivePlugins, + "total_inactive_plugins": t.TotalInactivePlugins, + "active_plugin_names": t.ActivePluginNames, + "inactive_plugin_names": t.InactivePluginNames, + } +}