commit c96959a7a74e1f9a78bfd009c5921fd77ec19eff Author: Zhongwei Li Date: Sun Nov 30 08:20:56 2025 +0800 Initial commit diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..b8bac90 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,15 @@ +{ + "name": "distributed-tracing-setup", + "description": "Set up distributed tracing for microservices", + "version": "1.0.0", + "author": { + "name": "Claude Code Plugins", + "email": "[email protected]" + }, + "skills": [ + "./skills" + ], + "commands": [ + "./commands" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..f9efbd7 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# distributed-tracing-setup + +Set up distributed tracing for microservices diff --git a/commands/setup-tracing.md b/commands/setup-tracing.md new file mode 100644 index 0000000..9272e4e --- /dev/null +++ b/commands/setup-tracing.md @@ -0,0 +1,35 @@ +--- +description: Set up distributed tracing +--- + +# Distributed Tracing Setup + +Implement distributed tracing for end-to-end request visibility in microservices. + +## Tracing Components + +1. **Trace Context Propagation**: Header-based context passing +2. **Span Creation**: Service and operation instrumentation +3. **Trace Collection**: Centralized trace aggregation +4. **Trace Analysis**: Latency breakdown and bottleneck detection +5. **Sampling Strategy**: Managing trace volume and cost + +## Process + +1. Choose tracing backend (Jaeger, Zipkin, Datadog APM, etc.) +2. Design instrumentation strategy +3. Implement OpenTelemetry or vendor SDK +4. Configure context propagation +5. Set up trace collection and storage +6. Create trace analysis dashboards + +## Output + +Provide: +- Tracing SDK integration code +- Instrumentation for key services +- Context propagation configuration +- Sampling strategy recommendations +- Backend setup instructions (Jaeger/Zipkin/etc.) +- Dashboard configuration for trace analysis +- Performance impact assessment diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..c946bd5 --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,61 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:jeremylongshore/claude-code-plugins-plus:plugins/performance/distributed-tracing-setup", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "421d821e419fe54cb422ce4b36336dc9ea35679a", + "treeHash": "ff2b88f4395f5b33a15974617b680680bf78c65f6bf271477f6ab00d28142452", + "generatedAt": "2025-11-28T10:18:24.835698Z", + "toolVersion": "publish_plugins.py@0.2.0" + }, + "origin": { + "remote": "git@github.com:zhongweili/42plugin-data.git", + "branch": "master", + "commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390", + "repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data" + }, + "manifest": { + "name": "distributed-tracing-setup", + "description": "Set up distributed tracing for microservices", + "version": "1.0.0" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "33d5d1753a67a1351b09fb5babfc2ea36915d5d72f54697fe6e4990005c8bd88" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "2cd342a1adccc9dee4f9b7388f07f4cfc6288c6695b7b854000e8c04eaa1efc4" + }, + { + "path": "commands/setup-tracing.md", + "sha256": "b134151f1589b6e5c9c012c81f0b5f4ae569123b37ac29f93b6eae31650e5492" + }, + { + "path": "skills/distributed-tracing-setup/SKILL.md", + "sha256": "042696c2e85342f0a2c9a09059c46ef2dcd87da0fb739e6b2061f277de37e891" + }, + { + "path": "skills/distributed-tracing-setup/references/README.md", + "sha256": "76e6e1f8b05e6688687424a2735489700d304bb3926016c929d7c01b08e3ce46" + }, + { + "path": "skills/distributed-tracing-setup/scripts/README.md", + "sha256": "c59a9a1e91eba7bce76490ef7e56896cac88237253aa375cfbc1decd41fc000a" + }, + { + "path": "skills/distributed-tracing-setup/assets/README.md", + "sha256": "32d45f9acfd315512f2a571e3bbf13102d2e98b48ad358309e706b1d14816465" + } + ], + "dirSha256": "ff2b88f4395f5b33a15974617b680680bf78c65f6bf271477f6ab00d28142452" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file diff --git a/skills/distributed-tracing-setup/SKILL.md b/skills/distributed-tracing-setup/SKILL.md new file mode 100644 index 0000000..7a9ad9b --- /dev/null +++ b/skills/distributed-tracing-setup/SKILL.md @@ -0,0 +1,52 @@ +--- +name: setting-up-distributed-tracing +description: | + This skill automates the setup of distributed tracing for microservices. It helps developers implement end-to-end request visibility by configuring context propagation, span creation, trace collection, and analysis. Use this skill when the user requests to set up distributed tracing, implement observability, or troubleshoot performance issues in a microservices architecture. The skill is triggered by phrases such as "setup tracing", "implement distributed tracing", "configure opentelemetry", or "add observability to microservices". +allowed-tools: Read, Write, Edit, Grep, Glob, Bash +version: 1.0.0 +--- + +## Overview + +This skill streamlines the process of setting up distributed tracing in a microservices environment. It guides you through the key steps of instrumenting your services, configuring trace context propagation, and selecting a backend for trace collection and analysis, enabling comprehensive monitoring and debugging. + +## How It Works + +1. **Backend Selection**: Determines the preferred tracing backend (e.g., Jaeger, Zipkin, Datadog). +2. **Instrumentation Strategy**: Designs an instrumentation strategy for each service, focusing on key operations and dependencies. +3. **Configuration Generation**: Generates the necessary configuration files and code snippets to enable distributed tracing. + +## When to Use This Skill + +This skill activates when you need to: +- Implement distributed tracing in a microservices application. +- Gain end-to-end visibility into request flows across multiple services. +- Troubleshoot performance bottlenecks and latency issues. + +## Examples + +### Example 1: Adding Tracing to a New Microservice + +User request: "setup tracing for the new payment service" + +The skill will: +1. Prompt for the preferred tracing backend (e.g., Jaeger). +2. Generate code snippets for OpenTelemetry instrumentation in the payment service. + +### Example 2: Troubleshooting Performance Issues + +User request: "implement distributed tracing to debug slow checkout process" + +The skill will: +1. Guide the user through instrumenting relevant services in the checkout flow. +2. Provide configuration examples for context propagation. + +## Best Practices + +- **Backend Choice**: Select a tracing backend that aligns with your existing infrastructure and monitoring tools. +- **Sampling Strategy**: Implement a sampling strategy to manage trace volume and cost, especially in high-traffic environments. +- **Context Propagation**: Ensure proper context propagation across all services to maintain trace continuity. + +## Integration + +This skill can be used in conjunction with other plugins to automate the deployment and configuration of tracing infrastructure. For example, it can integrate with infrastructure-as-code tools to provision Jaeger or Zipkin clusters. \ No newline at end of file diff --git a/skills/distributed-tracing-setup/assets/README.md b/skills/distributed-tracing-setup/assets/README.md new file mode 100644 index 0000000..393e395 --- /dev/null +++ b/skills/distributed-tracing-setup/assets/README.md @@ -0,0 +1,7 @@ +# Assets + +Bundled resources for distributed-tracing-setup skill + +- [ ] docker-compose.yml: A Docker Compose file for quickly deploying Jaeger and related services. +- [ ] otel_config_template.yaml: A template for configuring the OpenTelemetry SDK in various programming languages. +- [ ] example_trace.json: An example of a trace that can be used for testing and validation. diff --git a/skills/distributed-tracing-setup/references/README.md b/skills/distributed-tracing-setup/references/README.md new file mode 100644 index 0000000..a569a75 --- /dev/null +++ b/skills/distributed-tracing-setup/references/README.md @@ -0,0 +1,7 @@ +# References + +Bundled resources for distributed-tracing-setup skill + +- [ ] opentelemetry_best_practices.md: A detailed guide on best practices for using OpenTelemetry in microservices. +- [ ] jaeger_configuration.md: Comprehensive documentation on configuring Jaeger for optimal performance and scalability. +- [ ] supported_languages.md: Lists the programming languages and frameworks supported by the tracing setup scripts. diff --git a/skills/distributed-tracing-setup/scripts/README.md b/skills/distributed-tracing-setup/scripts/README.md new file mode 100644 index 0000000..357f154 --- /dev/null +++ b/skills/distributed-tracing-setup/scripts/README.md @@ -0,0 +1,7 @@ +# Scripts + +Bundled resources for distributed-tracing-setup skill + +- [ ] setup_jaeger.sh: Automates the deployment and configuration of a Jaeger instance for trace collection. +- [ ] instrument_service.py: Automatically instruments a microservice with OpenTelemetry SDK based on provided configuration. +- [ ] validate_tracing.py: Validates that tracing is correctly configured by sending test requests and verifying trace data.