Alerting: Add info to alert rule creation metric (#61105)

Add extra info to alert rule creation metrics
This commit is contained in:
Virginia Cepeda 2023-01-09 15:27:02 -03:00 committed by GitHub
parent 115218b1ff
commit 7604360622
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> = {}) { export function logInfo(message: string, context: Record<string, string | number | boolean> = {}) {
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); logInfo(LogMessages.successSavingAlertRule, { type, isNew: !existing });
if (!existing) { if (!existing) {
trackNewAlerRuleFormSaved({ trackNewAlerRuleFormSaved({