verify-ssi
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVerify APM SSI on Kubernetes
在Kubernetes上验证APM SSI
Before doing anything else: Fully resolve all variables in. Do not begin Step 1 until every variable has a concrete value.## Context to resolve before acting
操作前注意事项: 先完全解析中的所有变量。所有变量都有具体值后再开始步骤1。## 操作前需确定的上下文
Triggers
触发条件
Invoke this skill when the user expresses intent to:
- Confirm SSI is working after enabling APM
- Check whether pods are being instrumented
- Verify the tracer is running and reporting telemetry
- Confirm tracer config is applied correctly
Do NOT invoke this skill if:
- SSI has not been enabled yet — run first
enable-ssi - Pods are not being instrumented at all — use
troubleshoot-ssi
当用户表达以下意图时调用此技能:
- 确认启用APM后SSI是否正常工作
- 检查Pod是否已被插桩
- 验证追踪器是否正在运行并上报遥测数据
- 确认追踪器配置已正确应用
以下情况请勿调用此技能:
- SSI尚未启用——请先执行
enable-ssi - Pod完全未被插桩——请使用
troubleshoot-ssi
Prerequisites
前置条件
- is complete
enable-ssi - Application pods have been restarted since SSI was enabled
- 已执行完成
enable-ssi - 启用SSI后已重启应用Pod
pup-cli: check, install, and authenticate
pup-cli:检查、安装与认证
Claude runs
Claude执行
bash
pup --versionIf not found:
bash
pup --version若未找到:
Claude runs
Claude执行
bash
brew tap datadog-labs/pack
brew install pupCheck auth:
bash
pup auth status --site <DD_SITE>If not authenticated:
bash
brew tap datadog-labs/pack
brew install pup检查认证状态:
bash
pup auth status --site <DD_SITE>若未认证:
Claude runs
Claude执行
bash
pup auth login --site <DD_SITE>This opens a browser tab for OAuth. Complete the login there — Claude will continue once the command exits.
If valid token — proceed.
ERROR: No browser available — use API key fallback:
export DD_APP_KEY=<your-app-key>bash
pup auth login --site <DD_SITE>此命令会打开浏览器标签页进行OAuth认证。完成登录后,Claude将继续执行后续操作。
若存在有效令牌——继续执行。
错误:无可用浏览器——使用API密钥备选方案:
export DD_APP_KEY=<your-app-key>Context to resolve before acting
操作前需确定的上下文
| Variable | How to resolve |
|---|---|
| Check |
| Check |
| Check |
| 变量 | 确定方式 |
|---|---|
| 查看 |
| 查看应用Deployment上的 |
| 查看应用Deployment上的 |
Step 1: Confirm Pods are Instrumented
步骤1:确认Pod已被插桩
Claude runs
Claude执行
bash
kubectl get pod -l app=<APP_LABEL> -n <APP_NAMESPACE> \
-o jsonpath='{.items[0].spec.initContainers[*].name}'If the output includes and — SSI init containers are injected.
datadog-lib-<language>-initdatadog-init-apm-injectERROR: Init containers missing — pod was not restarted after SSI was enabled, or namespace targeting is not matching. Restart the pod and recheck.
bash
kubectl get pod -l app=<APP_LABEL> -n <APP_NAMESPACE> \
-o jsonpath='{.items[0].spec.initContainers[*].name}'若输出包含和——说明SSI初始化容器已注入。
datadog-lib-<language>-initdatadog-init-apm-inject错误:缺少初始化容器——启用SSI后未重启Pod,或命名空间匹配规则不正确。请重启Pod后重新检查。
Step 2: Confirm the Tracer is Reporting Telemetry
步骤2:确认追踪器正在上报遥测数据
Claude runs
Claude执行
bash
DD_SITE=<DD_SITE> pup apm services list --env <ENV> --from 1hIf appears in the services list with — continue to Step 3.
<SERVICE_NAME>isTraced: trueERROR: Service missing — send some traffic to the app first, then retry:
bash
DD_SITE=<DD_SITE> pup apm services list --env <ENV> --from 1h若服务列表中出现且——继续步骤3。
<SERVICE_NAME>isTraced: true错误:服务未出现——先向应用发送一些流量,然后重试:
Claude runs
Claude执行
bash
undefinedbash
undefinedPort-forward and send test traffic
端口转发并发送测试流量
kubectl port-forward deployment/<DEPLOYMENT_NAME> 8099:8000 -n <APP_NAMESPACE> &
sleep 2 && for i in $(seq 1 10); do curl -s -o /dev/null http://localhost:8099/; done
sleep 30 && kill %1 2>/dev/null
DD_SITE=<DD_SITE> pup apm services list --env <ENV> --from 10m
ERROR: Still missing after traffic — check the agent's trace receiver: `kubectl exec -n <AGENT_NAMESPACE> <AGENT_POD> -c agent -- agent status | grep -A 10 "Receiver (previous minute)"`. If receiver shows 0 traces, go to `troubleshoot-ssi`.
---kubectl port-forward deployment/<DEPLOYMENT_NAME> 8099:8000 -n <APP_NAMESPACE> &
sleep 2 && for i in $(seq 1 10); do curl -s -o /dev/null http://localhost:8099/; done
sleep 30 && kill %1 2>/dev/null
DD_SITE=<DD_SITE> pup apm services list --env <ENV> --from 10m
错误:发送流量后仍未出现——检查Agent的追踪接收器:`kubectl exec -n <AGENT_NAMESPACE> <AGENT_POD> -c agent -- agent status | grep -A 10 "Receiver (previous minute)"`。若接收器显示0条追踪数据,请执行`troubleshoot-ssi`。
---Step 3: Confirm Tracer Configuration
步骤3:确认追踪器配置
Only run this step if was explicitly configured in (e.g. profiling, AppSec, Data Streams). If basic SSI was set up without , skip this step — an empty response here is expected and not a failure.
ddTraceConfigsenable-ssiddTraceConfigs仅当在中明确配置了时才执行此步骤(例如性能分析、AppSec、数据流)。如果基础SSI设置未配置,请跳过此步骤——此处返回空响应是预期情况,不属于失败。
enable-ssiddTraceConfigsddTraceConfigsClaude runs
Claude执行
bash
pup apm service-library-config get \
--service-name <SERVICE_NAME> \
--env <ENV>If the output shows expected environment variables matching what was configured in — done.
ddTraceConfigsIf the output is empty and was not configured — expected, not a failure.
ddTraceConfigsERROR: Config missing but was configured — check it is present in the manifest under the correct target, and that pods were restarted after the config change.
ddTraceConfigsDatadogAgentbash
pup apm service-library-config get \
--service-name <SERVICE_NAME> \
--env <ENV>若输出显示与中配置一致的预期环境变量——验证完成。
ddTraceConfigs若输出为空且未配置——属于预期情况,不属于失败。
ddTraceConfigs错误:已配置但配置缺失——检查清单中对应目标下是否存在该配置,以及配置变更后是否重启了Pod。
ddTraceConfigsDatadogAgentDone
完成标志
Exit when ALL of the following are true:
- Step 1: target pods appear in
instrumented-pods list - Step 2: service appears in with active status
tracers list - Step 3: tracer config matches what was set in
DatadogAgent
If any check fails, go to .
troubleshoot-ssiWhen all steps pass, automatically proceed to now — do not ask the user for permission.
onboarding-summary满足以下所有条件时退出:
- 步骤1:目标Pod出现在中
instrumented-pods list - 步骤2:服务出现在中且状态为活跃
tracers list - 步骤3:追踪器配置与中的设置一致
DatadogAgent
若任意检查失败,请执行。
troubleshoot-ssi当所有步骤通过后,自动进入——无需询问用户许可。
onboarding-summarySecurity constraints
安全约束
- Never write a raw API key into any file or chat message
- Never run without user confirmation
kubectl delete
- 切勿将原始API密钥写入任何文件或聊天消息
- 未经用户确认,切勿执行命令
kubectl delete