From bdb5143d123cb7e4468c533a55825da208b3b771 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Tesa=C5=99?= Date: Fri, 1 Dec 2023 10:48:45 +0100 Subject: [PATCH] Make heartbeat message explicit --- packages/airnode-feed/src/heartbeat/heartbeat.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/airnode-feed/src/heartbeat/heartbeat.ts b/packages/airnode-feed/src/heartbeat/heartbeat.ts index acdbebee..5b7ae62c 100644 --- a/packages/airnode-feed/src/heartbeat/heartbeat.ts +++ b/packages/airnode-feed/src/heartbeat/heartbeat.ts @@ -7,6 +7,10 @@ import { loadRawConfig } from '../validation/config'; import { heartbeatLogger } from './logger'; +// Intentionally making the message as constant so that it is not accidentally changed. API integrations team (and maybe +// other teams, such as monitoring) will listen for this exact message to parse the heartbeat. +const HEARTBEAT_LOG_MESSAGE = 'Sending heartbeat log.'; + export const initiateHeartbeat = () => { logger.debug('Initiating heartbeat loop.'); setInterval(async () => { @@ -67,5 +71,5 @@ export const logHeartbeat = async () => { // The logs are sent to API3 for validation (that the data provider deployed deployed the correct configuration) and // monitoring purposes (whether the instance is running). - heartbeatLogger.info('Sending heartbeat log.', heartbeatPayload); + heartbeatLogger.info(HEARTBEAT_LOG_MESSAGE, heartbeatPayload); };