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
This commit is contained in:
Virginia Cepeda 2023-01-10 12:17:11 -03:00 committed by GitHub
parent 220ee3d1d4
commit 3b2ec752fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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 // 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<string, string | number | boolean> = {}) { export function logInfo(message: string, context: Record<string, string | number> = {}) {
if (config.grafanaJavascriptAgent.enabled) { if (config.grafanaJavascriptAgent.enabled) {
faro.api.pushLog([message], { faro.api.pushLog([message], {
level: GrafanaLogLevel.INFO, level: GrafanaLogLevel.INFO,

View File

@ -484,7 +484,7 @@ export const saveRuleFormAction = createAsyncThunk(
throw new Error('Unexpected rule form type'); throw new Error('Unexpected rule form type');
} }
logInfo(LogMessages.successSavingAlertRule, { type, isNew: !existing }); logInfo(LogMessages.successSavingAlertRule, { type, isNew: (!existing).toString() });
if (!existing) { if (!existing) {
trackNewAlerRuleFormSaved({ trackNewAlerRuleFormSaved({