From 3b2ec752fbbb240e10d1106dff553cc99962263e Mon Sep 17 00:00:00 2001 From: Virginia Cepeda Date: Tue, 10 Jan 2023 12:17:11 -0300 Subject: [PATCH] Alerting: change context parameter type (#61197) Change boolean value to string as the Faro API doesn't accept boolean types for the entries of the context object --- public/app/features/alerting/unified/Analytics.ts | 2 +- public/app/features/alerting/unified/state/actions.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/features/alerting/unified/Analytics.ts b/public/app/features/alerting/unified/Analytics.ts index 3efae8cf1e8..51c150d968b 100644 --- a/public/app/features/alerting/unified/Analytics.ts +++ b/public/app/features/alerting/unified/Analytics.ts @@ -17,7 +17,7 @@ export const LogMessages = { }; // logInfo from '@grafana/runtime' should be used, but it doesn't handle Grafana JS Agent and Sentry correctly -export function logInfo(message: string, context: Record = {}) { +export function logInfo(message: string, context: Record = {}) { if (config.grafanaJavascriptAgent.enabled) { faro.api.pushLog([message], { level: GrafanaLogLevel.INFO, diff --git a/public/app/features/alerting/unified/state/actions.ts b/public/app/features/alerting/unified/state/actions.ts index 873fb9f8e0c..6daa4946ba1 100644 --- a/public/app/features/alerting/unified/state/actions.ts +++ b/public/app/features/alerting/unified/state/actions.ts @@ -484,7 +484,7 @@ export const saveRuleFormAction = createAsyncThunk( throw new Error('Unexpected rule form type'); } - logInfo(LogMessages.successSavingAlertRule, { type, isNew: !existing }); + logInfo(LogMessages.successSavingAlertRule, { type, isNew: (!existing).toString() }); if (!existing) { trackNewAlerRuleFormSaved({