Skip to content

jcesarioatpeach/datadog-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Datadog Validator

Automated validation of Datadog telemetry configuration across your services.

A pure-code validation tool that checks whether your services are properly instrumented with Datadog telemetry—validating both local configuration files and runtime telemetry visibility.


Quick Start

# Install
git clone https://github.com/your-org/datadog-validator
cd datadog-validator
make install

# Check local configuration (no API required)
datadog-validator check-config --service my-service --service-dir ./my-service

# Validate runtime telemetry (requires Datadog API)
export DD_API_KEY="your-api-key"
export DD_APP_KEY="your-app-key"
datadog-validator validate --service my-service --envs production

What It Does

Local Configuration Validation

  • Dockerfile - Git metadata, hardcoded variables
  • Helm Charts - Datadog labels, environment variables
  • Dependencies - APM library versions
  • Service Inference - Deprecated pattern detection

Runtime Telemetry Validation

  • Metrics - Service metrics flowing to Datadog
  • Logs - Log correlation configured
  • Error Tracking - Error capture enabled
  • APM Traces - Trace data flowing

Output Formats

  • Terminal - Human-readable with colors and status indicators
  • JSON - Machine-readable for CI/CD automation

Core Principles

  • Validation Only - Reports issues, never modifies files
  • Pure Code - No AI, deterministic validation logic
  • CI/CD First - Exit codes and JSON output for automation
  • Fast - Local checks complete in <1 second

Documentation

User Documentation

Developer Documentation

AI Assistant Context

  • AGENTS.md - Guidance for AI assistants working with this codebase

Real-World Results

Validation results from actual services:

communicator service:

  • 77.8% pass rate (7/9 checks)
  • Well-configured modern service
  • Minor improvements needed

webhooks service:

  • 44.4% pass rate (4/9 checks)
  • Legacy configuration needing updates
  • Multiple deprecated patterns identified

See examples/VALIDATION_FINDINGS.md for detailed analysis.


Development

# Install with development dependencies
make install

# Run tests
make test

# Run linting and formatting
make check

# Run specific test
uv run pytest tests/test_dockerfile_validator.py -v

See docs/CONTRIBUTING.md for detailed development guide.


Project Structure

datadog-validator/
├── docs/                      # Comprehensive documentation
│   ├── README.md             # Documentation overview
│   ├── USER_GUIDE.md         # Complete usage guide
│   ├── ARCHITECTURE.md       # System design
│   ├── INTEGRATION.md        # CI/CD patterns
│   ├── TROUBLESHOOTING.md    # Common issues
│   ├── CONTRIBUTING.md       # Development guide
│   └── CHANGELOG.md          # Version history
├── src/
│   └── datadog_validator/
│       ├── cli.py            # CLI commands
│       ├── api_client.py     # Datadog API client
│       ├── validators/       # Local configuration validators
│       └── output/           # Output formatters
├── tests/                    # Test suite
├── examples/                 # Real-world validation examples
├── AGENTS.md                 # AI assistant guidance
└── README.md                 # This file

Support


License

MIT


Built with the Amplifier philosophy: Ruthless simplicity, pure code solutions, and clear separation of concerns.

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •