Skip to content

Conversation

@bdeitte
Copy link
Owner

@bdeitte bdeitte commented Dec 20, 2025

This will likely sit in PR for awhile until I get the chance to look through it more. Fixes #174

Copilot AI review requested due to automatic review settings December 20, 2025 20:02
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 optional client-side telemetry support for Datadog StatsD clients. The feature tracks metrics about the client itself (metrics sent, bytes transferred, packets dropped) to help diagnose high-throughput delivery issues. Telemetry is disabled by default and automatically excluded from mock/Telegraf modes.

Key Changes:

  • New Telemetry class to track and periodically flush client metrics
  • Integration into the StatsD client with opt-in includeDatadogTelemetry flag
  • Child clients inherit parent telemetry to consolidate tracking

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
lib/telemetry.js New telemetry tracking class with metric collection and periodic flushing
lib/statsd.js Integrates telemetry into client initialization, message sending, and cleanup
lib/statsFunctions.js Adds telemetry tracking for events and service checks
test/telemetry.js Comprehensive test suite for telemetry functionality
README.md Documents telemetry configuration and available metrics
CHANGES.md Changelog entry for telemetry feature
CLAUDE.md Updates documentation with telemetry patterns and linting rules

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

Repository owner deleted a comment from Copilot AI Dec 20, 2025
Repository owner deleted a comment from Copilot AI Dec 20, 2025
bdeitte and others added 5 commits December 20, 2025 14:06
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@bdeitte bdeitte merged commit b6cb857 into main Jan 4, 2026
13 checks passed
@bdeitte bdeitte deleted the datadog-telemetry branch January 4, 2026 19:19
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.

Implement Datadog client side telemetry

2 participants