Skip to content

Commit

Permalink
Make heartbeat message explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
Siegrift committed Dec 4, 2023
1 parent fa3a4b0 commit bdb5143
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/airnode-feed/src/heartbeat/heartbeat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down Expand Up @@ -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);
};

0 comments on commit bdb5143

Please sign in to comment.