[Synthetics] Fixed error telemetry event channel name (#133238) (#133554)

(cherry picked from commit 06fac37832)

Co-authored-by: Shahzad <shahzad.muhammad@elastic.co>
This commit is contained in:
Kibana Machine 2022-06-03 13:24:16 -05:00 committed by GitHub
parent f77d1e6c69
commit 3f636e9806
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -7,6 +7,6 @@
export const MONITOR_UPDATE_CHANNEL = 'synthetics-monitor-update';
export const MONITOR_CURRENT_CHANNEL = 'synthetics-monitor-current';
export const MONITOR_ERROR_EVENT_CHANNEL = 'synthetics-monitor-error-event';
export const MONITOR_ERROR_EVENTS_CHANNEL = 'synthetics-monitor-error-events';
export const MONITOR_SYNC_STATE_CHANNEL = 'synthetics-monitor-sync-state';
export const MONITOR_SYNC_EVENTS_CHANNEL = 'synthetics-monitor-sync-events';

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import { ServiceLocationErrors } from '../../../../common/runtime_types/monitor_management';
import { MONITOR_ERROR_EVENT_CHANNEL } from './constants';
import { MONITOR_ERROR_EVENTS_CHANNEL } from './constants';
export interface MonitorSyncEvent {
total: number;
@ -47,7 +47,7 @@ export interface MonitorUpdateTelemetryChannelEvents {
// channel name => event type
'synthetics-monitor-update': MonitorUpdateEvent;
'synthetics-monitor-current': MonitorUpdateEvent;
[MONITOR_ERROR_EVENT_CHANNEL]: MonitorErrorEvent;
[MONITOR_ERROR_EVENTS_CHANNEL]: MonitorErrorEvent;
'synthetics-monitor-sync-state': MonitorSyncEvent;
'synthetics-monitor-sync-events': MonitorSyncEvent;
}

View file

@ -21,7 +21,7 @@ import { TelemetryEventsSender } from '../../legacy_uptime/lib/telemetry/sender'
import {
MONITOR_UPDATE_CHANNEL,
MONITOR_CURRENT_CHANNEL,
MONITOR_ERROR_EVENT_CHANNEL,
MONITOR_ERROR_EVENTS_CHANNEL,
MONITOR_SYNC_STATE_CHANNEL,
MONITOR_SYNC_EVENTS_CHANNEL,
} from '../../legacy_uptime/lib/telemetry/constants';
@ -77,7 +77,7 @@ export function sendErrorTelemetryEvents(
}
try {
eventsTelemetry.queueTelemetryEvents(MONITOR_ERROR_EVENT_CHANNEL, [updateEvent]);
eventsTelemetry.queueTelemetryEvents(MONITOR_ERROR_EVENTS_CHANNEL, [updateEvent]);
} catch (exc) {
logger.error(`queuing telemetry events failed ${exc}`);
}