skrift-observability

Instrument Python apps with Pydantic Logfire for ASGI, SQLAlchemy, and HTTP tracing.

1|3|Updated Jun 17, 2025
One-click install
npx skills add https://github.com/Smarter-Dev/smarter-dev --skill skrift-observability
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: skrift-observability
Source: https://github.com/Smarter-Dev/smarter-dev/tree/main/smarter_dev/.claude/skills/skrift-observability
Command: npx skills add https://github.com/Smarter-Dev/smarter-dev --skill skrift-observability

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides optional structured observability for Python applications via Pydantic Logfire, delivering request tracing, SQL query visibility, HTTP client tracking, and hook spans, with a graceful no-op when logfire is not installed or disabled.

Core Features & Use Cases

  • Automatic request tracing for ASGI apps and HTTP interactions.
  • Visibility into SQL queries generated by SQLAlchemy.
  • HTTP client tracing for external calls (OAuth flows, API requests).
  • Hook execution spans for do_action and apply_filters.
  • No-op mode keeps performance overhead minimal when observability is disabled.

Quick Start

Install and enable Logfire in your app to begin automatic instrumentation.

Frequently Asked Questions about skrift-observability

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

FAQPage Schema
How do I add request tracing to my ASGI Python app?

To add request tracing to an ASGI app, apply structured observability instrumentation via Pydantic Logfire. This automatically surfaces spans for incoming requests and HTTP interactions once Logfire is installed and enabled in your application.

Can I track SQLAlchemy SQL queries with Python observability tools?

Yes, SQL query visibility is achieved by applying Logfire instrumentation to SQLAlchemy. This surfaces generated SQL queries within your traces, allowing you to monitor database interactions automatically when observability is enabled.

How does observability instrumentation work when Logfire is not installed?

When Logfire is not installed or disabled, the instrumentation operates in a no-op mode. This ensures zero performance overhead, allowing your Python application to function normally without active tracing or SQL visibility.

What is the best way to trace HTTP client calls like httpx in Python?

Tracing HTTP client calls is handled by applying Pydantic Logfire instrumentation to httpx. It provides HTTP client tracing for external calls, including OAuth flows and API requests, automatically capturing these interactions within your observability spans.

Do I need to modify my code to capture hook execution spans in Python?

Capturing hook execution spans requires applying the Logfire observability layer, which automatically instruments hooks for do_action and apply_filters. This integrates span tracking into your existing application flow without extensive manual code modifications.