Ensure admins can send true up telemetry, even if telemetry is disabled.
Этот коммит содержится в:
@@ -354,15 +354,18 @@ func requestTrueUpReview(c *Context, w http.ResponseWriter, r *http.Request) {
|
|||||||
// Do not send true-up review data if the user has already requested one for the quarter.
|
// Do not send true-up review data if the user has already requested one for the quarter.
|
||||||
// And only send a true-up review via as a one-time telemetry request if telemetry is disabled.
|
// And only send a true-up review via as a one-time telemetry request if telemetry is disabled.
|
||||||
telemetryEnabled := c.App.Config().LogSettings.EnableDiagnostics
|
telemetryEnabled := c.App.Config().LogSettings.EnableDiagnostics
|
||||||
if telemetryEnabled != nil && !*telemetryEnabled {
|
if telemetryEnabled != nil && *telemetryEnabled {
|
||||||
// Send telemetry data
|
// Send telemetry data
|
||||||
c.App.Srv().GetTelemetryService().SendTelemetry(model.TrueUpReviewTelemetryName, profileMap)
|
c.App.Srv().GetTelemetryService().SendTelemetry(model.TrueUpReviewTelemetryName, profileMap)
|
||||||
|
} else {
|
||||||
// Update the review status to reflect the completion.
|
// Telemetry is disabled, submit true up review profile via CWS.
|
||||||
status.Completed = true
|
c.App.Cloud().SubmitTrueUpReview(profileMap)
|
||||||
c.App.Srv().Store().TrueUpReview().Update(status)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update the review status to reflect the completion.
|
||||||
|
status.Completed = true
|
||||||
|
c.App.Srv().Store().TrueUpReview().Update(status)
|
||||||
|
|
||||||
// Encode to string rather than byte[] otherwise json.Marshal will encode it further.
|
// Encode to string rather than byte[] otherwise json.Marshal will encode it further.
|
||||||
encodedData := b64.StdEncoding.EncodeToString(profileMapJson)
|
encodedData := b64.StdEncoding.EncodeToString(profileMapJson)
|
||||||
responseContent := struct {
|
responseContent := struct {
|
||||||
|
|||||||
@@ -48,4 +48,7 @@ type CloudInterface interface {
|
|||||||
|
|
||||||
SelfServeDeleteWorkspace(userID string, deletionRequest *model.WorkspaceDeletionRequest) error
|
SelfServeDeleteWorkspace(userID string, deletionRequest *model.WorkspaceDeletionRequest) error
|
||||||
SubscribeToNewsletter(userID string, req *model.SubscribeNewsletterRequest) error
|
SubscribeToNewsletter(userID string, req *model.SubscribeNewsletterRequest) error
|
||||||
|
|
||||||
|
// Used only for when a customer has telemetry disabled. In this scenario, true up review telemetry will be submitted via CWS.
|
||||||
|
SubmitTrueUpReview(trueUpReviewProfile map[string]any) error
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,10 +223,6 @@ const TrueUpReview: React.FC = () => {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (telemetryEnabled) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
pageVisited(TELEMETRY_CATEGORIES.TRUE_UP_REVIEW, 'pageview_true_up_review');
|
pageVisited(TELEMETRY_CATEGORIES.TRUE_UP_REVIEW, 'pageview_true_up_review');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user