distributed-tracing
OpenTelemetry, Jaeger, tracing across microservices for full request visibility.
Works with
---
name: distributed-tracing
description: OpenTelemetry, Jaeger, tracing across microservices for full request visibility.
license: Apache-2.0
---
# Distributed Tracing
> OpenTelemetry, Jaeger, tracing across microservices for full request visibility.
## Core Concepts
### Spans
Individual units of work in a trace.
```typescript
import { trace } from '@opentelemetry/api';
const tracer = trace.getTracer('app-tracer');
async function processOrder(order: Order): Promise<void> {
const span = tracer.startSpan('processOrder');
try {
const reservationSpan = tracer.startSpan('reserveInventory', { parent: span });
await inventoryService.reserve(order);
reservationSpan.end();
const paymentSpan = tracer.startSpan('processPayment', { parent: span });
await paymentService.charge(order.amount);
paymentSpan.end();
} finally {
span.end();
}
}
```
### Context Propagation
Propagate trace context across service boundaries.
```typescript
import { W3CTraceContextPropagator } from '@opentelemetry/core';
const propagator = new W3CTraceContextPropagator();
// In client
const headers = {};
propagator.inject(
context.active(),
headers,
(headers, key, value) => { headers[key] = value; }
);
// In server
const extractedContext = propagator.extract(
context.active(),
req.headers,
(headers, key) => headers[key]
);
```
### Instrumentation
Automatic tracing of libraries.
```typescript
import { HttpInstrumentation } from '@opentelemetry/instrumentation-http';
import { ExpressInstrumentation } from '@opentelemetry/instrumentation-express';
import { MongoDBInstrumentation } from '@opentelemetry/instrumentation-mongodb';
const httpInstrumentation = new HttpInstrumentation();
const expressInstrumentation = new ExpressInstrumentation();
const mongodbInstrumentation = new MongoDBInstrumentation();
```
## Best Practices
1. **Sampling**: Use head-based sampling for high-volume services
2. **Baggage**: Pass request context through trace baggage
3. **Attributes**: Add meaningful span attributes
4. **Cardinality**: Control dimension explosion
5. **Retention**: Balance cost vs insight
## Related Skills
- Service Mesh (Istio)
- Microservices Architecture
- Monitoring & Observability
---
**Token Savings**: ~850 tokens | **Last Updated**: 2025-11-08 | **Installs**: 1089 | **Remixes**: 334More Observability skills
google-agents-cli-observability
google/agents-cli
>
azure-observability
microsoft/azure-skills
Azure Observability Services including Azure Monitor, Application Insights, Log Analytics, Alerts, and Workbooks. Provides metrics, APM, distributed tracing, KQL queries, and interactive reports. USE FOR: Azure Monitor, Application Insights, Log Analytics, Alerts, Workbooks, metrics, APM, distributed tracing, KQL queries, interactive reports, observability, monitoring dashboards. DO NOT USE FOR: instrumenting apps with App Insights SDK (use appinsights-instrumentation), querying Kusto/ADX clusters (use azure-kusto), cost analysis (use azure-cost-optimization).
social
coreyhaines31/marketingskills
When the user wants help creating, scheduling, or optimizing social media content for LinkedIn, Twitter/X, Instagram, TikTok, Facebook, or other platforms, or wants to do social listening and engagement triage. Also use when the user mentions 'LinkedIn post,' 'Twitter thread,' 'social media,' 'content calendar,' 'social scheduling,' 'engagement,' 'viral content,' 'what should I post,' 'repurpose this content,' 'tweet ideas,' 'LinkedIn carousel,' 'social media strategy,' 'grow my following,' 'TikTok video,' 'Reels,' 'Shorts,' 'video script,' 'video hook,' 'short-form video,' 'create a reel,' 'social listening,' 'brand mentions,' 'competitor monitoring,' 'top posts to comment on,' 'find people asking for,' 'carousel,' 'slide-by-slide,' or 'document post.' Use this for social media content creation, repurposing, scheduling, short-form video scripting, and social listening. For broader content strategy, see content-strategy. For paid ads, see ad-creative. For earned media, see public-relations.

