Skip to main content

Create heartbeats with a known URL

I’d love a way to create heartbeats with the API in a way that would allow the URL for the heartbeat to be known at the time of the checkly deployment (so it could be referenced in the same pull request - one PR to create the recurring job, the heartbeat check, and the call to the created heartbeat.). I don’t know exactly how that would work - maybe the URL could be supplied by the caller in a sufficiently parameterized way (yet still be “per environment”)

new HeartbeatCheck(getChecklyId('recurring-job-emails'), {
  name: getChecklyName('Outfitter Daily Reservation Email Job Heartbeat Check'),
  activated: true,
  period: 24,
  periodUnit: 'hours',
  grace: 1,
  graceUnit: 'hours',
  url: 'https://{myaccountname}.checklyhq.com/{heartbeatname}?tags={tags}'
  tags: ['heartbeat',CHECK_ENV.ENV_NAME]
})
1 comment

Log in to comment and vote

Comments1

  • Rikard Nilsson

    •

    Jul 30, 2024

    Hi Scott,

    Thanks for the feedback! This isn’t something we have planned, but I understand the use case and we’ll take it into consideration next time we iterate on heartbeat checks!

    Cheers,

    Rikard