Agent Native

enable-ssi

Enables Single Step Instrumentation on Linux by setting Unified Service Tags (DD_SERVICE, DD_ENV, DD_VERSION) on systemd services and verifies the Datadog APM…

by DatadogOfficial publisherNot reviewed

Identity proven by GitHub's verified organisation badge (DataDog, datadog-labs)

Agents
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
License
MIT (permissive)
Pin
9cbd518pinned Oct 9, 2026
Context cost
about 2,100 tokenswhen the skill loads
GitHub stars
177on datadog-labs/agent-skills
Scripts
None found

What it does

“Configure Unified Service Tags and verify Single Step Instrumentation (SSI) injection on Linux hosts — SSI automatically instruments applications for APM without code changes. Only use if the Datadog Agent is already installed.”
The author's description, from SKILL.md

Generated summary from the skill's own text

Enables Single Step Instrumentation on Linux by setting Unified Service Tags (DD_SERVICE, DD_ENV, DD_VERSION) on systemd services and verifies the Datadog APM launcher injection into running processes. Requires the Datadog Agent to be already installed with SSI enabled.

When to use it

  • Datadog Agent with SSI already installed, need to tag services for APM
  • Configure environment and version labels on running applications
  • Verify APM tracer injection in Linux host processes

When not to

  • Datadog Agent not yet installed on the target host
  • Targeting Kubernetes clusters instead of Linux hosts
  • Manual APM instrumentation already present in application code

Install

These commands install from the publisher's repository and need no account.

skills CLI

npx skills add datadog-labs/agent-skills --skill enable-ssi

Installs from the repository's default branch, which may have changed since the commit we checked.

GitHub CLI 2.90 or later

gh skill install datadog-labs/agent-skills enable-ssi@9cbd518922765c46d5d446f09cf03d060dd4b46f

Installs the commit we checked (9cbd518).

Copy by hand

Download the folder at 9cbd518 and put it in .claude/skills/enable-ssi for Claude Code and in .agents/skills/enable-ssi for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.

Skill folder on GitHub at 9cbd518

Claude Code plugin

/plugin install datadog@claude-plugins-official

The publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.

Copy for your agent

A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.

Prompt

Install the agent skill "enable-ssi" by Datadog.

Source, pinned to commit 9cbd518922765c46d5d446f09cf03d060dd4b46f:
https://github.com/datadog-labs/agent-skills/tree/9cbd518922765c46d5d446f09cf03d060dd4b46f/dd-apm/linux-ssi/enable-ssi

1. Download that folder at exactly this commit. Do not use the default branch.
2. Copy every file unchanged, keeping the folder structure, into .claude/skills/enable-ssi/ for Claude Code and .agents/skills/enable-ssi/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist.
3. Do not edit the files, and do not run any script in the folder unless I ask you to.
4. When you are done, list the files you copied and where you put them.

Listing and checks: https://www.agentnative.dev/skills/datadog/enable-ssi-agent-skills

SKILL.md at the pin

---
name: enable-ssi
description: Configure Unified Service Tags and verify Single Step Instrumentation (SSI) injection on Linux hosts — SSI automatically instruments applications for APM without code changes. Only use if the Datadog Agent is already installed.
metadata:
  version: "1.0.0"
  author: datadog-labs
  repository: https://github.com/datadog-labs/agent-skills
  tags: datadog,apm,linux,ssi,instrumentation,single-step,ld-preload,ust
  alwaysApply: "false"
---

# Configure SSI and Unified Service Tags on Linux

> **Before doing anything else:** Fully resolve all variables in `## Context to resolve before acting`. Do not begin Step 0 until every variable has a concrete value.

## Triggers

Invoke this skill when:
- The Datadog Agent is already installed with SSI (`DD_APM_INSTRUMENTATION_ENABLED=host` was used) and you need to configure Unified Service Tags on the application service
- The user wants to set `DD_SERVICE`, `DD_ENV`, `DD_VERSION` on a running service
- SSI is installed but `/proc/<pid>/maps` doesn't show the language tracer (launcher-only injection)

Do NOT invoke this skill if:
- The Datadog Agent is not yet installed — run `agent-install` first
- SSI packages are missing from `/opt/datadog-packages/` — re-run `agent-install`
- The target is a Kubernetes cluster — use `dd-apm-k8s-enable-ssi` instead

---

## Background

When the install script runs with `DD_APM_INSTRUMENTATION_ENABLED=host`, it:
1. Installs `datadog-apm-inject` and language library packages under `/opt/datadog-packages/`
2. Writes the launcher path into `/etc/ld.so.preload`
3. SSI is now armed — every new process on the host gets the launcher injected at startup

**What SSI does NOT configure automatically:**
- `DD_SERVICE`, `DD_ENV`, `DD_VERSION` — these must be set on the application process for traces to be tagged correctly
- Without `DD_SERVICE`, the tracer auto-detects a service name (often the process name or framework name), which may not match what the user expects

---

## Prerequisites

**Verify SSI is armed:**

### Claude runs

```bash
ssh -o StrictHostKeyChecking=no -i <SSH_KEY> <SSH_USER>@<SSH_HOST> \
  "cat /etc/ld.so.preload && ls /opt/datadog-packages/ | grep apm"
```

If `/etc/ld.so.preload` contains a path to the launcher, and `/opt/datadog-packages/datadog-apm-inject` exists — SSI is armed.

ERROR: Either missing — run `agent-install` first.

**Check for existing manual instrumentation:**

### Claude runs

```bash
ssh -o StrictHostKeyChecking=no -i <SSH_KEY> <SSH_USER>@<SSH_HOST> "
grep -r 'import ddtrace\|from ddtrace\|require .dd-trace.\|opentelemetry' <SOURCE_DIR> 2>/dev/null | head -5 || echo 'No manual instrumentation found'
"
```

ERROR: Manual instrumentation found — SSI silently disables itself when it detects an existing tracer. Remove the manual import/package before proceeding.

**Check base libc:**

### Claude runs

```bash
ssh -o StrictHostKeyChecking=no -i <SSH_KEY> <SSH_USER>@<SSH_HOST> \
  "ldd --version 2>&1 | head -1"
```

ERROR: musl — SSI requires glibc. No workaround; must use a glibc-based OS.

---

## Context to resolve before acting

| Variable | How to resolve |
|---|---|
| `SERVICE_NAME` | Ask the user — how the service should appear in Datadog APM (e.g. `payment-api`) |
| `ENV` | Ask the user — environment name (e.g. `production`, `staging`, `dev`) |
| `VERSION` | Ask the user or read from the app's version file / git tag |
| `SYSTEMD_SERVICE_NAME` | From `systemctl list-units --type=service --state=running` on the host — the unit running the app |
| `SSH_KEY` | Path to SSH private key |
| `SSH_USER` | SSH username |
| `SSH_HOST` | Hostname or IP of the target host |

---

## Step 0 (Only if existing instrumentation detected): Remove Manual Instrumentation

- Python: `pip uninstall ddtrace`, remove `import ddtrace` / `ddtrace-run` from CMD
- Node.js: `npm uninstall dd-trace`, remove `require('dd-trace')` 
- Java: remove `-javaagent:/path/to/dd-java-agent.jar` JVM flag
- Ruby: `gem uninstall ddtrace`, remove `require 'ddtrace'`
- .NET: remove `Datadog.Trace` NuGet and profiler env vars

After removing, restart the service. **Confirm with the user before restarting.** Tell the user: "I need to restart `<SYSTEMD_SERVICE_NAME>` to remove the old instrumentation. This will cause a brief outage. Ready to proceed?" Wait for confirmation.

---

## Step 1: Set Unified Service Tags on the Application Process

Without UST, traces arrive with an auto-detected service name that may not match user expectations, and won't be tagged with env or version.

**For systemd-managed services** (most common):

### Claude runs

```bash
ssh -o StrictHostKeyChecking=no -i <SSH_KEY> <SSH_USER>@<SSH_HOST> \
  "sudo systemctl cat <SYSTEMD_SERVICE_NAME>"
```

Add a drop-in override (preserves the original unit file):

### What you need to do in a terminal

```bash
ssh -o StrictHostKeyChecking=no -i <SSH_KEY> <SSH_USER>@<SSH_HOST>
sudo systemctl edit <SYSTEMD_SERVICE_NAME>
```

Add to the editor:

```ini
[Service]
Environment="DD_SERVICE=<SERVICE_NAME>"
Environment="DD_ENV=<ENV>"
Environment="DD_VERSION=<VERSION>"
```

Apply:

### Claude runs

```bash
ssh -o StrictHostKeyChecking=no -i <SSH_KEY> <SSH_USER>@<SSH_HOST> \
  "sudo systemctl daemon-reload && sudo systemctl show <SYSTEMD_SERVICE_NAME> | grep -E 'DD_SERVICE|DD_ENV|DD_VERSION|DD_DATA_STREAMS_ENABLED'"
```

If the UST vars appear in the output — configuration applied.

**For supervisord:**
```ini
# In [program:<name>] section of supervisord.conf
environment=DD_SERVICE="<SERVICE_NAME>",DD_ENV="<ENV>",DD_VERSION="<VERSION>"
```
Reload: `sudo supervisorctl reload`

**For pm2:**
```js
// ecosystem.config.js
env: { DD_SERVICE: "<SERVICE_NAME>", DD_ENV: "<ENV>", DD_VERSION: "<VERSION>" }
```
Reload: `pm2 reload <app>`

---

## Step 1b: Check for Event-Driven Services

**Skip this step entirely** in an eval cluster (kind cluster name contains "evalya") or when running non-interactively: run nothing, ask nothing, and continue to the next step.

Otherwise, read the `## Is DSM a fit?` section of `.claude/skills/dd-apm/enable-dsm/SKILL.md` and run its detection command.

- Fit found (messaging client, broker, queue-triggered Lambda, or the user describes services handing work to each other asynchronously) → follow `enable-dsm`. It asks the user once, states the plan rule, and makes the config change without restarting.
- No fit → skip. Do not mention DSM.

If the user agrees, `enable-dsm` adds its variable to the drop-in from Step 1, so the restart in Step 2 picks up both.

---

## Step 2: Restart the Service

**Confirm with the user before restarting.** Tell the user: "I need to restart `<SYSTEMD_SERVICE_NAME>` for SSI to inject into it. This will cause a brief outage. Ready to proceed?" Wait for confirmation.

### Claude runs

```bash
ssh -o StrictHostKeyChecking=no -i <SSH_KEY> <SSH_USER>@<SSH_HOST> \
  "sudo systemctl restart <SYSTEMD_SERVICE_NAME> && sleep 3 && sudo systemctl is-active <SYSTEMD_SERVICE_NAME>"
```

If `active` is returned — service is running.

ERROR: Returns `failed` — check logs:
```bash
ssh -o StrictHostKeyChecking=no -i <SSH_KEY> <SSH_USER>@<SSH_HOST> \
  "sudo journalctl -u <SYSTEMD_SERVICE_NAME> --since '1 minute ago' | tail -30"
```

---

## Step 3: Confirm Injection and UST in the Running Process

### Claude runs

```bash
ssh -o StrictHostKeyChecking=no -i <SSH_KEY> <SSH_USER>@<SSH_HOST> \
  "pgrep -a -f '<SERVICE_NAME>' | head -3"
```

Use the PID:

```bash
# Authoritative injection check
ssh -o StrictHostKeyChecking=no -i <SSH_KEY> <SSH_USER>@<SSH_HOST> \
  "sudo cat /proc/<PID>/maps | grep -E 'launcher|apm-library|datadog'"

# UST vars in process environment
ssh -o StrictHostKeyChecking=no -i <SSH_KEY> <SSH_USER>@<SSH_HOST> \
  "sudo cat /proc/<PID>/environ | tr '\0' '\n' | grep -E 'DD_SERVICE|DD_ENV|DD_VERSION|DD_DATA_STREAMS_ENABLED'"
```

If both the launcher and language library appear in maps, and UST vars are in environ (plus `DD_DATA_STREAMS_ENABLED=true` if DSM was enabled in Step 1b), SSI and tagging are fully configured.

ERROR: Launcher in maps but no language library — injection attempted but failed. Run:
```bash
pup apm troubleshooting list --hostname <DD_HOSTNAME> --timeframe 15m
```

Go to `troubleshoot-ssi` if errors are present.

---

## Done

Exit when ALL of the following are true:
- [ ] Launcher and language library visible in `/proc/<PID>/maps`
- [ ] `DD_SERVICE`, `DD_ENV`, `DD_VERSION` present in `/proc/<PID>/environ`
- [ ] Service is running and healthy

Automatically proceed to `verify-ssi` now — do not ask the user for permission.

---

## Security constraints

- Never write a raw API key into any file or chat message
- Always confirm with the user before restarting production services
- Do not modify application source code — configure only via environment variables in the service unit

From datadog-labs/agent-skills at 9cbd518, shown as plain text under its license: MIT (permissive). The license text is in LICENSE.

View SKILL.md on GitHub at 9cbd518

Files

1 file, 8.9 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.

Skill folder on GitHub at 9cbd518
All 50 skills from Datadog

More from Datadog

  • dd-code-generation

    This skill enables agents to interact with Datadog through the pup CLI tool for immediate queries and operations, or generate code for integrating Datadog…

    Claude Code, Codex, Cursor +3 · about 4.3K tokens · pinned 6 days ago

  • dd-file-issue

    This skill helps file GitHub issues to the DataDog/pup repository for bugs, feature requests, and documentation problems related to the pup CLI, agents, and…

    Claude Code, Codex, Cursor +3 · about 2.2K tokens · pinned 6 days ago

  • dd-idp

    Queries Datadog's Unified Entity Graph to find and connect software services, teams, infrastructure, dependencies, and operational context through read-only…

    Claude Code, Codex, Cursor +4 · about 1.8K tokens · pinned 6 days ago

  • dd-logs

    This skill enables agents to search, process, and archive Datadog logs using the pup command-line tool.

    Claude Code, Codex, Cursor +4 · about 1.2K tokens · pinned 6 days ago

  • agent-observability-auto-experiment

    Runs a local hill-climb optimization loop to improve code or prompts against real Datadog LLM-Obs evaluation data.

    Contains scripts

    Claude Code · about 28.4K tokens · pinned 6 days ago

  • agent-observability-build-eval-from-annotations

    Fits an LLM evaluator to human-labeled data by iteratively scoring a judge against the labels, reading its errors, making targeted improvements, and…

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 12.1K tokens · pinned 6 days ago

All Observability skills
  • agent-observability-online-experiment

    This skill guides users through setting up online A/B tests for LLM applications using Datadog's Agent Observability and feature flags.

    by DatadogOfficial publisher

    Claude Code, Codex, Cursor +4 · about 5.9K tokens · pinned 6 days ago

  • agent-observability-replay-trace

    Replay a single production trace against local code changes to test fixes iteratively.

    by DatadogOfficial publisher

    Contains scripts

    Claude Code · about 3.4K tokens · pinned 6 days ago

  • agent-observability-session-classify

    Classifies whether a user's intent was satisfied in a Datadog Agent Observability trace or session by analyzing conversation content, tool outcomes, and…

    by DatadogOfficial publisher

    Claude Code, Codex, Cursor +4 · about 15.7K tokens · pinned 6 days ago

  • agent-skills

    This skill package provides Datadog observability tools for AI agents, including monitoring, logging, tracing, APM, and cloud integrations through the pup CLI.

    by DatadogOfficial publisher

    Claude Code, Codex, Cursor +4 · about 910 tokens · pinned 6 days ago

  • dd-account-setup

    Ensures a user has a valid Datadog API key and application key on the correct region before running any Datadog instrumentation.

    by DatadogOfficial publisher

    Claude Code, Codex, Cursor +4 · about 4.3K tokens · pinned 6 days ago

  • dd-apm

    This skill enables agents to set up Datadog APM for distributed tracing and performance analysis.

    by DatadogOfficial publisher

    Claude Code · about 1.8K tokens · pinned 6 days ago

The skills listed here are third-party software, collected from public GitHub repositories as a catalog of recent skills and provided as is. Agent Native does not write or control them and is not responsible for any harm, loss or damage caused by installing or using them. Labels and checks describe what we saw at one commit and are not a guarantee. Read a skill's files before you run it. Terms of use