Skip to content

Conversation

@bdeitte
Copy link
Owner

@bdeitte bdeitte commented Dec 7, 2025

Add in debug logging so that you can see what exactly is happening if you use "NODE_DEBUG=hot-shots". Fixes #257

Copilot AI review requested due to automatic review settings December 7, 2025 00:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds comprehensive debug logging throughout the hot-shots library using Node.js's built-in util.debuglog() functionality, which can be enabled via the NODE_DEBUG=hot-shots environment variable. This addresses issue #257 by providing visibility into the library's internal operations for troubleshooting.

Key changes include:

  • Implementation of debug logging across all transport types (TCP, UDP, UDS, Stream)
  • Addition of debug statements for client initialization, message sending, buffering, and error handling
  • Documentation updates explaining how to enable and use the debug logging feature

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/transport.js Adds debug logging to all transport creation functions and their send/close operations, including DNS resolution and retry logic
lib/statsd.js Adds debug logging for client initialization, message buffering, queue flushing, and socket operations
lib/statsFunctions.js Adds debug logging to all metric functions (timing, increment, histogram, etc.) to track when metrics are recorded
README.md Documents the new debugging feature with usage instructions and adds an example for timing measurements
CHANGES.md Records the addition of debug logging feature in the changelog

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bdeitte bdeitte merged commit 49ab2ed into main Dec 7, 2025
16 of 23 checks passed
@bdeitte bdeitte deleted the debug-logging branch December 7, 2025 16:41
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.

How to debug data not arriving to DD?

2 participants