dd-git-tagging
БесплатноЗапускает вложенные скриптыНе проверенDatadog Git metadata tagging for one service. Checks whether the service's traces already carry the Git commit and repository URL, and if not, sets…
от datadog-labs★ 188 звёзд на GitHubОб этом скилле
Datadog Git metadata tagging
Source code integration has two halves: connecting the Git provider to Datadog, and tagging telemetry with the commit and repository it came from. This skill does the second half for one service. A service counts as tagged when its spans carry both git.commit.sha and git.repository_url.
Inputs: the service name and, optionally, the env. Use them if the caller passed them. Otherwise read DD_SERVICE and DD_ENV from the project's config; with several services and no name given, ask which one.
Rules
- Change only how the two Git values reach the service. No unrelated edits, and no notes or docs files: explanations go in the report.
- Compute both values when the service builds or launches, never as literals: a committed SHA is wrong after the next commit.
- Strip credentials from the repository URL so a
user:token@never lands in an image or in telemetry. - Done means the check below passes. If you can't run or deploy the service, report the changes and how to confirm them.
1. Check
python3 -I -B <this-skill-dir>/scripts/check_git_tags.py --service <service> [--env <env>] --json
It authenticates with the signed-in pup session, or with DD_API_KEY, DD_APP_KEY, and DD_SITE when pup isn't signed in. Without either, run the same search with the Datadog MCP aggregate_spans tool (count, last 15 minutes; widen the window only if that finds nothing, since older spans are searchable only when indexed), using the query the script would print:
@_top_level:1 service:<service> [env:<env>] (git.commit.sha:* OR @git.commit.sha:* OR @_dd.git.commit.sha:*) (git.repository_url:* OR @git.repository_url:* OR @_dd.git.repository_url:*)
A non-zero count means tagged; zero means search again without the two Git clauses to tell untagged from no spans.
| Exit | Status | Do |
|---|---|---|
| 0 | tagged |
Nothing to change. Report the commit and repository it found, and stop. If source is tracer, the service sends both values but Datadog hasn't turned them into git.* tags, which happens when traces skip the Agent: add the agentless DD_TAGS entries from step 3. |
| 2 | untagged |
Spans arrive without one or both values (has_commit_sha, has_repository_url). Go to step 2. |
| 3 | no_spans |
Nothing from this service in the last 15 minutes, nor in a day of indexed spans. If the service isn't instrumented or running yet (for example, another skill is setting it up), go to step 2 and check again once it runs. Otherwise confirm the service name and env with the user before editing. |
| 1 | error | Report the message. A 403 means the key or session can't read APM data. |
2. Inspect
Find every place the service is built and started: Dockerfile ARG/ENV/CMD, compose, Kubernetes or Helm manifests, platform config (Procfile, app.yaml, fly.toml, render.yaml), CI workflows that build images or deploy, and launch scripts (package.json scripts.start, a gunicorn or uvicorn command).
Look for existing DD_GIT_COMMIT_SHA and DD_GIT_REPOSITORY_URL. If they exist but the check says untagged, they aren't reaching the running process. Common causes:
- A Dockerfile
ARGwith no matchingENV, so the value exists at build time only. - CI sets the variable in the build job but the deploy doesn't pass it to the container.
- A hardcoded value or a placeholder like
<repo-url>. - The
.gitdirectory is excluded from the build (.dockerignore), so agitcall inside the image returns nothing. - The service sends traces without an Agent (
DD_AGENTLESS_ENABLED=true) and sets onlyDD_GIT_*. Without an Agent, Datadog keeps the tracer's raw values but never turns them intogit.*tags, so the values must also be inDD_TAGS.
If every build and launch path already sets both DD_GIT_* variables correctly (and, without an Agent, their DD_TAGS entries), change nothing: the running service was built or started another way, or before this config existed. Skip to step 5 and tell the user to rebuild or redeploy through that path.
3. Configure
Get the values from the checkout:
git rev-parse HEAD
git config --get remote.origin.url | sed -E 's#://[^/@]*@#://#'
Then set both in the environment of the running process, wherever the project defines it, matching what the project already uses. Have the build or deploy compute them each time; never paste the values in by hand:
- Host or VM: the service's systemd unit (
Environment=, or anEnvironmentFile=the deploy writes), or the env file its process manager loads. - Kubernetes or Helm: the container's
envin the manifest or chart values, filled by the CI step that deploys. - Docker: an
ARGand anENVfor each in the final (runtime) stage, so the build value carries into the running container:ARG DD_GIT_REPOSITORY_URL ARG DD_GIT_COMMIT_SHA ENV DD_GIT_REPOSITORY_URL=${DD_GIT_REP
Установить dd-git-tagging в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл dd-git-tagging?
Datadog Git metadata tagging for one service. Checks whether the service's traces already carry the Git commit and repository URL, and if not, sets DD_GIT_COMMIT_SHA and DD_GIT_REPOSITORY_URL where the service is built and launched (plus matching DD_TAGS entries only for services that send traces without an Agent), then confirms tagged traces arrive. This is the telemetry half of Datadog source code integration, which links traces, errors, and profiles to the exact code that ran, and which services built on it, such as Live Debugger, rely on. Works for any language Datadog's tracers support. Use when the user's Git provider is connected to Datadog but code links, inline source, or "view in GitHub" don't show up; when Datadog's source code setup page says a service isn't tagged; when asked to add Git commit or repository info to traces; or when another skill needs telemetry tagged with Git metadata. Not for connecting GitHub to Datadog (use dd-github-onboarding) or installing a tracer.
Как установить скилл dd-git-tagging?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dd-git-tagging запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic