askill
request-tracing

request-tracingSafety 95Repository

Instrument HTTP/gRPC endpoints with distributed tracing and RED metrics

1 stars
1.2k downloads
Updated 12/26/2025

Package Files

Loading files...
SKILL.md

Request Tracing

Every request needs: a span, RED metrics, and trace context propagation.

Required Attributes

AttributeExampleNote
http.methodGET, POSTRequired
http.route/api/orders/:idTemplate, not actual path!
http.status_code200, 500Required
user.tierpremiumRecommended (not user_id!)

RED Metrics

Rate:     http.requests.count{method, route, status}
Errors:   http.requests.errors{method, route, error_type}
Duration: http.request.duration{method, route} (histogram p50/p95/p99)

Middleware Flow

Request → Extract trace context (W3C traceparent)
        → Start span (method + route)
        → Start timer
        → Call handler
        → Set status_code
        → Record duration histogram
        → If 4xx/5xx: increment error counter
        → End span
        → Inject trace context into response

Context Propagation

Critical: Always propagate to downstream services:

// Outgoing request
propagator.inject(ctx, headers)

Common Mistakes

  1. Using actual path/api/orders/12345 creates millions of unique values
  2. Missing propagation → Traces break at service boundaries
  3. Only tracking success → Must track errors with error_type

References

  • references/methodology/red-methodology.md
  • references/platforms/{platform}/http.md

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

68/100Analyzed 2/25/2026

Solid reference-style skill covering HTTP/gRPC request tracing with RED metrics and context propagation. Well-structured with tables and flow diagrams. Lacks actionable code examples but provides comprehensive conceptual framework. Generic enough to be reusable across projects. Located in proper skills folder. Missing triggers/when-to-use section.

95
75
70
55
50

Metadata

Licenseunknown
Version-
Updated12/26/2025
Publishernexus-labs-automation

Tags

apiobservability