Token导航 LogoToken导航

Agent Skill · 前端设计

tracekit-distributed-tracing(Tracekit 分布式追踪)

tracekit-distributed-tracing 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

tracekit-distributed-tracing 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 8,327。

总安装 294周安装 8GitHub Stars 1下载 65核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:tracekit-distributed-tracing(Tracekit 分布式追踪)
来源仓库:https://github.com/tracekit-dev/tracekit-for-ai
仓库路径:skills/tracekit-distributed-tracing
安装命令:
npx skills add https://github.com/tracekit-dev/tracekit-for-ai --skill tracekit-distributed-tracing
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/tracekit-dev/tracekit-for-ai --skill tracekit-distributed-tracing

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于处理 GitHub 仓库、Issue 和 Pull Request 协作信息。适合围绕代码变更或协作事项进行整理时使用。可结合来源仓库和原始 README 继续核验具体用法。

安装命令:npx skills add https://github.com/tracekit-dev/tracekit-for-ai --skill tracekit-distributed-tracing 建议确认权限范围和是否执行命令后再使用

来源仓库内路径:skills/tracekit-distributed-tracing

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/tracekit-dev/tracekit-for-ai --skill tracekit-…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

tracekit-distributed-tracing 怎么安装?

在终端执行 npx skills add https://github.com/tracekit-dev/tracekit-for-ai --skill tracekit-distribute…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

tracekit-distributed-tracing 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

tracekit-distributed-tracing 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

tracekit-distributed-tracing 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

tracekit-distributed-tracing 用的人多吗?

公开数据是累计安装 294 次,近一周安装 8 次,下载 65 次,GitHub 1 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

tracekit-distributed-tracing 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
tracekit-distributed-tracing

Tracekit 分布式追踪 · 本页

2941接触敏感数据未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

TraceKit Distributed Tracing

Auth Bootstrap

Do not tell the user to go sign up, log in separately, or manually create an API key before setup. First check for existing TraceKit auth. If ~/.tracekitconfig does not contain the production profile or TRACEKIT_API_KEY is missing, apply the tracekit-auth skill first. Use ./scripts/run-tracekit-auth.sh status to check, then guide the user through the TraceKit email verification flow with register and verify. That flow signs the user into an existing account for that email or creates the account automatically, then saves the returned credentials for the rest of the setup.

When To Use

Use this skill when the user asks to:

  • Connect traces across services
  • Set up frontend-to-backend tracing
  • Configure distributed tracing
  • Set up trace propagation between microservices
  • See the full request flow across services
  • View the unified waterfall for a request
  • Correlate frontend and backend performance
  • Trace requests through microservices
  • Debug latency across multiple services

Non-Negotiable Rules

  1. Never hardcode API keys in code. Always use TRACEKIT_API_KEY env var.
  2. Always use W3C Trace Context (traceparent header) for propagation - never proprietary headers.
  3. Always verify traces connect across services in the unified waterfall view before considering setup complete.
  4. Always configure tracePropagationTargets in the frontend SDK to limit which outbound requests get trace headers. This prevents leaking trace context to third-party APIs.

Prerequisites

  • At least two TraceKit SDKs must be installed - one frontend and one or more backend, or multiple backend services.
  • Each service must have its own unique serviceName configured in SDK init.
  • If only one SDK is installed, complete the other SDK skills first:

- Frontend: tracekit-browser-sdk, tracekit-react-sdk, tracekit-vue-sdk, etc. - Backend: tracekit-node-sdk, tracekit-go-sdk, tracekit-python-sdk, etc.

  • Browser SDK or framework wrapper must have tracePropagationTargets configured (see Step 2).

Detection

Before applying this skill, detect the project setup:

  1. Scan for multiple TraceKit SDKs across the project or monorepo.
  2. Frontend detection: Check package.json for @tracekit/browser, @tracekit/react, @tracekit/vue, @tracekit/angular, @tracekit/nextjs, or @tracekit/nuxt.
  3. Backend detection: Check go.mod for github.com/Tracekit-Dev/go-sdk, requirements.txt for tracekit-apm, package.json for @tracekit/node-apm, composer.json for tracekit/php-apm, pom.xml for tracekit-core, .csproj for TraceKit.AspNetCore, or Gemfile for tracekit.
  4. If only frontend found, suggest completing a backend SDK skill first.
  5. If only backend found, suggest completing a browser SDK or framework wrapper skill first.
  6. If both found, proceed with distributed tracing setup.

Step 1: Understand W3C Trace Context

Distributed tracing works by passing trace context between services via HTTP headers. TraceKit uses the W3C Trace Context standard, which is compatible with OpenTelemetry, Jaeger, Zipkin, and other observability tools.

How It Works

  1. Every traced request carries a traceparent header with the format: traceparent: 00-<trace-id>-<span-id>-<flags> Example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01
  2. When a frontend makes an API call, the browser SDK injects the traceparent header into the outbound request.
  3. When a backend receives the request, the backend SDK extracts the traceparent header and continues the same trace.
  4. Each service creates child spans under the same trace ID, forming a tree of operations.
  5. TraceKit collects all spans with the same trace ID and renders them in the unified waterfall view - showing timing, dependencies, and service boundaries.

Why W3C Trace Context

  • Industry standard - works across vendors and languages
  • No vendor lock-in - switch observability backends without changing propagation
  • Supported natively by all TraceKit SDKs
  • Compatible with OpenTelemetry exporters if you use them alongside TraceKit

Step 2: Configure Frontend Trace Propagation

In your frontend SDK init, configure tracePropagationTargets to specify which backend URLs should receive trace headers.

TraceKit.init({
  apiKey: process.env.TRACEKIT_API_KEY,
  serviceName: 'my-react-app',
  tracePropagationTargets: [
    'api.yourapp.com',           // production API
    /^https:\/\/api\./,          // regex: any api.* subdomain
    'localhost:3001',            // development backend
    'localhost:8080',            // development Go service
  ],
});

What tracePropagationTargets Does

  • Only requests matching these patterns get traceparent and tracestate headers injected.
  • Requests to non-matching URLs (third-party APIs, CDNs, analytics) do not get trace headers.
  • Default behavior (if not set): same-origin requests only.
  • Security: This prevents leaking internal trace context to external services. Always configure this explicitly.

Pattern Matching

  • String patterns match as substrings: 'api.yourapp.com' matches https://api.yourapp.com/users.
  • Regex patterns provide full control: /^https:\/\/api\./ matches only HTTPS API subdomains.
  • Include both production and development URLs if you want traces in local development.

Step 3: Configure Backend Trace Extraction

Each TraceKit backend SDK automatically extracts traceparent from incoming requests when the SDK middleware is registered. No additional configuration is needed if you followed the SDK skill setup.

Verify Middleware Is Registered

Distributed tracing requires the SDK middleware to be registered before route handlers. Verify for your backend:

Node.js (Express):

const app = express();
// TraceKit middleware must be first
app.use(TraceKit.Handlers.requestHandler());
app.use(TraceKit.Handlers.tracingHandler());
// Then your routes
app.get('/api/users', (req, res) => { /* ... */ });

Node.js (Fastify):

// Register TraceKit plugin before routes
fastify.register(require('@tracekit/node-apm').fastifyPlugin);

Go (Gin):

r := gin.Default()
// TraceKit middleware must be before routes
r.Use(sdk.GinMiddleware())
r.GET("/api/users", handleUsers)

Go (Echo):

e := echo.New()
// TraceKit middleware must be before routes
e.Use(sdk.EchoMiddleware())
e.GET("/api/users", handleUsers)

Python (Django):

# settings.py  - TraceKit middleware should be early in the list
MIDDLEWARE = [
    'tracekit.integrations.django.TracekitMiddleware',
    # ... other middleware
]

Python (FastAPI):

from tracekit.integrations.fastapi import TracekitMiddleware
app = FastAPI()
app.add_middleware(TracekitMiddleware)

If middleware is registered correctly, the backend SDK will automatically extract traceparent from incoming requests and create child spans under the same trace.

Step 4: Multi-Service Propagation

When one backend service calls another backend service, trace context must also be propagated. Use the TraceKit-instrumented HTTP client instead of the raw standard library client.

Node.js (Backend-to-Backend)

const { tracekit } = require('@tracekit/node-apm');

// Use tracekit.fetch  - auto-injects traceparent into outbound requests
const response = await tracekit.fetch('http://go-service:8080/api/data');
const data = await response.json();

Go (Backend-to-Backend)

// Use tracekit.HTTPClient  - auto-injects traceparent into outbound requests
resp, err := tracekit.HTTPClient.Get("http://python-service:5000/api/data")
if err != nil {
    sdk.CaptureException(err)
    return
}
defer resp.Body.Close()

Python (Backend-to-Backend)

import tracekit

# Use tracekit.requests  - auto-injects traceparent into outbound requests
response = tracekit.requests.get("http://node-service:3001/api/data")
data = response.json()

Key principle: Always use the TraceKit-instrumented HTTP client for outbound requests between your own services. The raw http.Get(), fetch(), or requests.get() will not propagate trace context.

Step 5: Concrete Multi-Service Example

Walk through a complete distributed trace across three services.

Scenario: React Frontend -> Node.js API -> Go Microservice

Architecture:

  • React frontend (port 3000) - user-facing UI
  • Node.js API (port 3001) - API gateway, handles auth and routing
  • Go microservice (port 8080) - user data service, queries database

Request flow:

  1. User clicks "Load Users" in React app - the React SDK creates a browser span.
  2. React app calls fetch('/api/users') - the browser SDK injects traceparent into the request headers (because localhost:3001 is in tracePropagationTargets).
  3. Node.js API receives the request - the Node SDK extracts traceparent, creates a child span under the same trace ID.
  4. Node.js API calls the Go microservice - using tracekit.fetch('http://localhost:8080/users'), which injects traceparent into the outbound request.
  5. Go microservice receives the request - the Go SDK extracts traceparent, creates a child span.
  6. Go microservice queries the database - the SDK creates a database span under the Go service span.
  7. Response flows back - each service closes its spans as responses return.

All spans share the same trace ID, forming a complete tree of the request lifecycle.

Unified Waterfall View

Navigate to https://app.tracekit.dev/traces, find the trace, and click to open the waterfall:

Service              Timeline                                    Duration
---------------------------------------------------------------------------
React Frontend       |========================================|   420ms
  fetch /api/users   |  ====================================  |   380ms
Node.js API          |    ================================    |   360ms
  GET /api/users     |    ============================        |   300ms
  validate-auth      |    ====                                |    40ms
Go Microservice      |        ========================        |   240ms
  GET /users         |        ========================        |   240ms
  db.Query           |          ==================            |   180ms

Each row represents a service. Child spans are indented. The timeline shows exactly where time is spent - in this example, 180ms of the total 420ms is database query time in the Go microservice.

Step 6: Verification

After configuring distributed tracing, verify end-to-end:

  1. Make a request from your frontend that hits at least 2 backend services.
  2. Navigate to https://app.tracekit.dev/traces.
  3. Find the trace - filter by service name or sort by recency.
  4. Click to open the unified waterfall view.
  5. Verify all services appear as separate rows with their own spans.
  6. Verify span timing shows the full request lifecycle with correct parent-child relationships.
  7. Click any span to see its service name, operation name, duration, and metadata (tags, HTTP status, etc.).

If services are missing from the waterfall, see Troubleshooting below.

Step 7: Custom Span Context

Add business context to distributed traces so you can search and filter by meaningful attributes.

Frontend Tags

// Set user context  - propagates to all frontend spans
TraceKit.setTag('user.id', userId);
TraceKit.setTag('user.plan', 'enterprise');

// Set tags on a specific transaction
const transaction = TraceKit.startTransaction({ name: 'checkout' });
transaction.setTag('cart.items', itemCount);

Backend Tags

// Node.js  - add request context
tracekit.setTag('order.id', orderId);
tracekit.setTag('tenant.id', tenantId);
// Go  - add request context
span := sdk.GetCurrentSpan(ctx)
span.SetTag("order.id", orderID)
span.SetTag("tenant.id", tenantID)
# Python  - add request context
tracekit.set_tag('order.id', order_id)
tracekit.set_tag('tenant.id', tenant_id)

Tags are searchable in the TraceKit dashboard. Use them to find traces for specific users, orders, tenants, or any business entity.

Troubleshooting

Traces not connecting across services

  • Check tracePropagationTargets: Ensure the frontend SDK config includes the backend URL. If the backend URL is not matched, no traceparent header is sent.
  • Check CORS configuration: The backend must allow traceparent and tracestate in Access-Control-Allow-Headers: // Express CORS example app.use(cors({origin: 'http://localhost:3000', allowedHeaders: ['Content-Type', 'Authorization', 'traceparent', 'tracestate'],})); // Gin CORS example config:= cors.DefaultConfig() config.AllowHeaders = append(config.AllowHeaders, "traceparent", "tracestate") r.Use(cors.New(config))
  • Check browser DevTools: Open the Network tab, find the API request, and check if traceparent appears in the request headers. If missing, the URL is not in tracePropagationTargets.

Missing backend spans

  • Check SDK middleware is registered: The middleware must be added before route handlers (see Step 3).
  • Check backend is sending data: Visit https://app.tracekit.dev/traces and filter by the backend service name. If no traces appear at all, the backend SDK init may have an issue.
  • Check TRACEKIT_API_KEY is set: Each backend service needs its own API key configured.

CORS errors in browser console

  • Access-Control-Allow-Headers must include traceparent: The traceparent header is a custom header, so CORS preflight must explicitly allow it.
  • Access-Control-Allow-Origin must match: Ensure the frontend origin is allowed by the backend CORS config.
  • **Do not use * for credentials:** If your frontend sends cookies or auth headers, Access-Control-Allow-Origin cannot be * - use the explicit origin.

Only seeing one service in the waterfall

  • Check each service has a unique serviceName: If two services share the same name, their spans will be grouped together and appear as one service.
  • Check both services are sending to the same TraceKit project: If services use different API keys for different projects, traces will not be correlated.
  • Check the trace ID: In the dashboard, click a trace and verify the trace ID. Then filter by that trace ID - all spans should appear regardless of service.

Trace waterfall shows gaps

  • Network latency: Gaps between a parent span ending and a child span starting indicate network time. This is normal for distributed systems.
  • Async operations: If a service processes requests asynchronously, the response may return before all child operations complete. Use await or synchronous patterns for operations that should appear in the waterfall.
  • Clock skew: If services run on different machines with unsynchronized clocks, spans may appear slightly out of order. Use NTP to synchronize clocks across your infrastructure.

Frontend spans appear but backend spans do not

  • This usually means traceparent is being sent but the backend is not extracting it. Verify the backend SDK middleware is registered (Step 3).
  • Check backend logs for TraceKit initialization errors.
  • Test with curl: Send a request with a manual traceparent header to the backend and check if a trace appears: curl -H "traceparent: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01" \ http://localhost:3001/api/users

Next Steps

Once distributed tracing is working across services, consider:

  • Code Monitoring - Set live breakpoints on traced requests to capture production state without redeploying (see tracekit-code-monitoring skill)
  • Alerts - Alert on cross-service latency or error propagation patterns (see tracekit-alerts skill)
  • Releases - Track which release introduced a latency regression visible in traces (see tracekit-releases skill)

References

  • Distributed tracing docs: https://app.tracekit.dev/docs/distributed-tracing
  • W3C Trace Context spec: https://www.w3.org/TR/trace-context/
  • Dashboard: https://app.tracekit.dev
  • See also: tracekit-browser-sdk, tracekit-node-sdk, tracekit-go-sdk skills for single-service setup

平台分布

Codex

36.98%
按下载量换算24

Claude

28.62%
按下载量换算19

Cursor

20.35%
按下载量换算13

Gemini CLI

9.9%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills