Skip to content

Conversation

@chaitanyamedidar
Copy link

Fix for Telemetry DNS Errors (Issue #13272)

Problem

Users experience repeated DNS errors that don't affect core functionality but clutter logs:

Error: getaddrinfo ENOTFOUND http-intake.logs.datadoghq.com

Occurs when Claude Code attempts telemetry connections to Datadog but encounters network restrictions, DNS failures, or connectivity issues.

Solution

Set the CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC environment variable (available since v2.0.17):

Quick Fix

macOS/Linux:

export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=true

Windows (PowerShell):

$env:CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC = "true"

Windows (CMD):

set CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=true

Permanent Configuration

macOS/Linux - Add to ~/.bashrc, ~/.zshrc, or ~/.profile:

export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=true

Windows (PowerShell) - Add to your PowerShell profile ($PROFILE):

$env:CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC = "true"

Windows (System) - Set as system environment variable through Windows Settings → System → Advanced → Environment Variables.

What This PR Does

Adds troubleshooting documentation for telemetry DNS errors (Issue #13272):

  • Main README: Added "Telemetry Connection Errors" quick fix section
  • Plugins README: Added telemetry-fix reference
  • New plugin directory with comprehensive troubleshooting guide

Common Scenarios

Corporate Networks - DNS restrictions or firewall blocks *.datadoghq.com
VPN Usage - VPN blocks/redirects DNS queries to monitoring services
Offline/Air-gapped - Limited or no internet connectivity

Related Environment Variables

Variable Purpose Since
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC Disables telemetry and release notes 2.0.17
CLAUDE_CODE_PROXY_RESOLVES_HOSTS Proxy DNS resolution (opt-in) 2.0.55
HTTP_PROXY / HTTPS_PROXY HTTP proxy configuration 2.0.26
NO_PROXY Bypass proxy for specific hosts 1.0.90

Testing

Verified on Windows 11 (PowerShell 5.1)
Cross-platform commands validated
Environment variable behavior confirmed

References

@chaitanyamedidar
Copy link
Author

@chrislloyd @dougbarth Please review this PR for Issue #13272.

Added troubleshooting documentation for telemetry DNS errors (getaddrinfo ENOTFOUND http-intake.logs.datadoghq.com).

Changes:

Main README: Added quick fix section for telemetry errors
New telemetry-fix with troubleshooting guide
Documents existing CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC env var (v2.0.17+)
These errors don't affect core functionality but clutter logs in corporate/VPN/offline environments. Documentation-only change with cross-platform support.

Tested on Windows 11, PowerShell 5.1.

@chaitanyamedidar chaitanyamedidar marked this pull request as ready for review December 15, 2025 14:27
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