observability-bundle

Integrate metrics, logs, traces, and error tracking for FastAPI services.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/saintgo7/claude-skills --skill observability-bundle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: observability-bundle
Source: https://github.com/saintgo7/claude-skills/tree/main/observability-bundle
Command: npx skills add https://github.com/saintgo7/claude-skills --skill observability-bundle

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

It solves the operational blind spots caused by fragmented observability by integrating metrics, logs, distributed traces, and error tracking into a single FastAPI-ready setup.

Core Features & Use Cases

  • 3-pillar instrumentation: Prometheus for metrics, Loki for logs, and OpenTelemetry with Tempo for traces, aligned to the same request lifecycle.
  • Structured logging with trace correlation: Uses structlog JSON logging plus Trace/Span ID injection so Loki searches can jump into Tempo traces.
  • Sentry for error-centric debugging: Captures unhandled exceptions and breadcrumbs, with trace sampling coordinated with OpenTelemetry.
  • Production stack provisioning guidance: Provides LGTM-oriented Docker compose wiring and Grafana datasource provisioning for end-to-end visibility.
  • Operational use cases: Adding Sentry and OpenTelemetry to an existing FastAPI service, enabling distributed tracing across httpx/SQLAlchemy, troubleshooting incidents, and validating alert rules for SLO/SLA-style monitoring.

Quick Start

Run the skill installer with ./install.sh observability-bundle.

Frequently Asked Questions about observability-bundle

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I correlate FastAPI request logs with distributed traces in Loki and Tempo?

You can correlate FastAPI request logs with distributed traces by injecting OpenTelemetry Trace/Span IDs into structlog JSON logs, enabling Loki↔Tempo derived fields to jump between log queries and trace spans during incident troubleshooting.

How do I add Sentry error tracking to a FastAPI service with OpenTelemetry?

Adding Sentry error tracking to FastAPI with OpenTelemetry involves capturing unhandled exceptions and breadcrumbs while coordinating trace sampling between Sentry and OpenTelemetry to maintain consistent distributed tracing visibility.

What's the best way to enable distributed tracing across httpx and SQLAlchemy in FastAPI?

The best way to enable distributed tracing across httpx and SQLAlchemy in FastAPI is using OpenTelemetry auto-instrumentation, which automatically captures HTTP client calls and database queries within the same request lifecycle trace span context.

Does this observability setup require Prometheus metrics alignment with FastAPI?

Yes, the observability setup requires Prometheus FastAPI metrics alignment to ensure metrics, logs, and traces share the same request lifecycle, eliminating fragmented observability during production incidents.

Can I use Grafana provisioning to set up datasources for Loki and Tempo together?

Yes, you can use Grafana datasource provisioning to configure Loki and Tempo together, including derived fields that enable jumping from Loki log entries directly into corresponding Tempo distributed traces.

Why do I need controlled sampling for OpenTelemetry instrumentation in production FastAPI?

You need controlled sampling for OpenTelemetry instrumentation in production FastAPI to manage trace volume and cost, ensuring Sentry error tracking and distributed traces remain coordinated without overwhelming backend storage systems.