Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@alexeckardt
Copy link
Collaborator

@alexeckardt alexeckardt commented Apr 4, 2025

TL;DR

Added a HEARTBEAT_DEBUG environment variable to control heartbeat error logging -- stops flooding the terminal with 'heartbeat could not send' error if the backend is not online.

What changed?

  • Added a new HEARTBEAT_DEBUG environment variable in .env.example with a default value of true
  • Modified the heartbeat error handling in monitoring.ts to only log errors when HEARTBEAT_DEBUG is not explicitly set to false
  • Added a comment explaining the purpose of the new environment variable

How to test?

  1. Copy the new HEARTBEAT_DEBUG variable to your .env file
  2. Set HEARTBEAT_DEBUG=false to suppress heartbeat error logs
  3. Set HEARTBEAT_DEBUG=true or leave it unset to see heartbeat error logs
  4. Trigger a heartbeat error (e.g., by disconnecting from the network) to verify the logging behavior

Why make this change?

This change allows developers to suppress heartbeat error logs during local development, which can be noisy and distracting when working in an environment where heartbeat failures are expected or irrelevant. The default behavior remains unchanged (errors are logged), but developers now have the option to disable this logging when needed.

Copy link
Collaborator Author

alexeckardt commented Apr 4, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@alexeckardt alexeckardt changed the base branch from 04-03-feat_zoom-teams-exit-tests to graphite-base/268 April 4, 2025 07:26
@alexeckardt alexeckardt force-pushed the 04-04-fix_turn-off-heartbeat-flooding-if-required branch from cdc0d4e to 8d4f0d8 Compare April 4, 2025 07:26
@alexeckardt alexeckardt changed the base branch from graphite-base/268 to main April 4, 2025 07:26
@alexeckardt alexeckardt marked this pull request as ready for review April 4, 2025 07:28
AWS_REGION=your_region

# Usefull for debugging. If you set to =false, then any failure in the heartbeat ping will not be logged.
HEARTBEAT_DEBUG=true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion] set to false by default

@alexeckardt alexeckardt merged commit e3cef5b into main Apr 6, 2025
13 checks passed
Copy link
Collaborator Author

Merge activity

  • Apr 6, 2:48 PM EDT: A user merged this pull request with Graphite.

@alexeckardt alexeckardt deleted the 04-04-fix_turn-off-heartbeat-flooding-if-required branch April 6, 2025 18:48
liongyeehong pushed a commit to Xxell-Ai/meetingbot that referenced this pull request Sep 15, 2025
### TL;DR

Added a HEARTBEAT_DEBUG environment variable to control heartbeat error logging -- stops flooding the terminal with 'heartbeat could not send' error if the backend is not online.

### What changed?

- Added a new `HEARTBEAT_DEBUG` environment variable in `.env.example` with a default value of `true`
- Modified the heartbeat error handling in `monitoring.ts` to only log errors when `HEARTBEAT_DEBUG` is not explicitly set to `false`
- Added a comment explaining the purpose of the new environment variable

### How to test?

1. Copy the new `HEARTBEAT_DEBUG` variable to your `.env` file
2. Set `HEARTBEAT_DEBUG=false` to suppress heartbeat error logs
3. Set `HEARTBEAT_DEBUG=true` or leave it unset to see heartbeat error logs
4. Trigger a heartbeat error (e.g., by disconnecting from the network) to verify the logging behavior

### Why make this change?

This change allows developers to suppress heartbeat error logs during local development, which can be noisy and distracting when working in an environment where heartbeat failures are expected or irrelevant. The default behavior remains unchanged (errors are logged), but developers now have the option to disable this logging when needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants