Skip to content

Conversation

mtoffl01
Copy link
Contributor

@mtoffl01 mtoffl01 commented Sep 18, 2025

What does this PR do?

Introduces env var DD_HEALTH_METRICS_ENABLED and programmatic API WithHealthMetrics to disable health metrics, which report by default.

Motivation

This feature could potentially be noisy and/or introduce performance regressions. Users should be able to disable functionality if need be.
Note: the name of the env var was pulled from the feature parity dashboard

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • New code is free of linting errors. You can check this by running ./scripts/lint.sh locally.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.

Unsure? Have a question? Request a review!

@mtoffl01 mtoffl01 requested review from a team as code owners September 18, 2025 20:05
@pr-commenter
Copy link

pr-commenter bot commented Sep 18, 2025

Benchmarks

Benchmark execution time: 2025-09-22 20:28:34

Comparing candidate commit 61224fe in PR branch mtoff/disable-health-metrics with baseline commit 3119b73 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 24 metrics, 0 unstable metrics.

@mtoffl01 mtoffl01 marked this pull request as draft September 18, 2025 20:28
Copy link
Contributor

@hannahkm hannahkm left a comment

Choose a reason for hiding this comment

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

lgtm!!

@hannahkm
Copy link
Contributor

Failures look like flakes + API changes. I didn't realize this was still in draft, but once those failures get fixed it looks good to go from me 😅

@mtoffl01 mtoffl01 marked this pull request as ready for review September 22, 2025 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants