agentleFS
ryanmacleanryanmaclean/skills/dd-tags/SKILL.md

dd-tags

Skill1 starsChanged 50 days agoMITView on GitHub

Datadog unified service tagging best practices — env/service/version core tags, naming rules, and tag standards across APM traces, logs, and metrics. Use when setting up DD_SERVICE/DD_ENV/DD_VERSION, normalizing tags, or auditing tag coverage.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Alphanumeric + underscores: - Use a-z, 0-9, _, -, :, /, .

    line 35
  2. Very specific:

    Colons for namespacing: - Use : for hierarchical tags (e.g., team:backend)

    line 37
  3. Distinctive:

    No spaces: - Use underscores or hyphens instead

    line 38
  4. Distinctive:

    High-cardinality values: - Avoid UUIDs, timestamps, user IDs as tag values

    line 101
  5. Distinctive:

    Inconsistent naming: - Use same tag names across all services

    line 102
  6. Very specific:

    Missing core tags: - Always set env, service, version

    line 103
  7. Distinctive:

    Hardcoded values: - Use environment variables for flexibility

    line 104
  8. Distinctive:

    Use tag inheritance from infrastructure where possible

    line 118
  9. Distinctive:

    Avoid creating new tags for each deployment

    line 119
  10. Very specific:

    Use DD_TAGS for static tags shared across requests

    line 120

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Datadog Tagging Best Practices

Overview

This skill defines Datadog's official tagging best practices for unified service tagging across all telemetry (APM traces, logs, metrics).

The Three Core Tags (Required)

Datadog reserves three standard tags that automatically connect all telemetry:

TagEnvironment VariableDescriptionExample Values
envDD_ENVDeployment environmentproduction, staging, development, local
serviceDD_SERVICEApplication/service namepayment-api, user-service, ddtrace-agent-v3
versionDD_VERSIONCode version/release1.2.3, v2.0.0, 0.3.0

Additional Recommended Tags

TagPurposeExample Values
teamOwnership/cost allocationplatform, backend, infra
componentSub-service componentapi, worker, scheduler
clusterKubernetes cluster nametundra-dome, gastown, minim4-tundra
namespaceK8s namespacedefault, datadog, airflow

Tag Naming Rules

  1. Lowercase only - Tags must be lowercase
  2. Start with letter - Tags must begin with a letter
  3. Alphanumeric + underscores - Use a-z, 0-9, _, -, :, /, .
  4. Max 200 characters - Tag names limited to 200 chars
  5. Colons for namespacing - Use : for hierarchical tags (e.g., team:backend)
  6. No spaces - Use underscores or hyphens instead

Implementation Patterns

Python Scripts (ddtrace)

#!/usr/bin/env python3
from __future__ import annotations

import os

# Datadog Unified Service Tagging
try:
    from ddtrace import config, patch_all, tracer

    # Core tags (required)
    config.service = os.environ.get("DD_SERVICE", "script-name")
    config.env = os.environ.get("DD_ENV", "development")
    config.version = os.environ.get("DD_VERSION", "0.1.0")

    # Additional tags
    tracer.set_tags({
        "team": "platform",
        "component": "automation",
    })

    patch_all()
except ImportError:
    pass

Environment Variables (Shell/CI)

export DD_ENV=production
export DD_SERVICE=my-service
export DD_VERSION=1.2.3
export DD_TAGS="team:backend,component:api,cluster:tundra-dome"

Kubernetes Labels

metadata:
  labels:
    tags.datadoghq.com/env: "production"
    tags.datadoghq.com/service: "my-service"
    tags.datadoghq.com/version: "1.2.3"

Service Naming Conventions

PatternExampleUse Case
{app}-{component}crew-apiMicroservices
{domain}-{function}payment-processorDomain-driven
{script-name}ddtrace-agent-v3Standalone scripts
{package-name}tundra-automationPython packages

Anti-Patterns to Avoid

  • Over-tagging - Each tag adds cost; keep tag cardinality low
  • High-cardinality values - Avoid UUIDs, timestamps, user IDs as tag values
  • Inconsistent naming - Use same tag names across all services
  • Missing core tags - Always set env, service, version
  • Hardcoded values - Use environment variables for flexibility

Version Tag Strategies

StrategyFormatExample
Semantic versioningMAJOR.MINOR.PATCH1.2.3
Git SHA (short){sha}abc1234
Date-basedYYYYMMDD.N20260205.1
Branch + SHA{branch}-{sha}main-abc1234

Cost Optimization

  • Limit custom tags to essential ones (team, component, cluster)
  • Use tag inheritance from infrastructure where possible
  • Avoid creating new tags for each deployment
  • Use DD_TAGS for static tags shared across requests

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.