Fastapi Otel Common
This FastAPI OTel Common skill simplifies observability by automatically instrumenting your API with OTel tracing and metrics for easy monitoring & debugging.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add fastapi-otel-common npx -- -y @trustedskills/fastapi-otel-common
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"fastapi-otel-common": {
"command": "npx",
"args": [
"-y",
"@trustedskills/fastapi-otel-common"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill provides common utilities and extensions for integrating OpenTelemetry (OTel) with FastAPI applications. It simplifies the process of instrumenting FastAPI endpoints, middleware, and dependencies for distributed tracing and metrics collection. The skill aims to reduce boilerplate code and improve observability in FastAPI-based backends.
When to use it
- Observability is a priority: When building or maintaining a FastAPI application where you need detailed insights into performance and behavior.
- Distributed Tracing: When your application interacts with other services and you want to trace requests across those boundaries.
- Metrics Collection: To gather metrics about API endpoint response times, error rates, and resource utilization for monitoring purposes.
- Standardized Instrumentation: When wanting a consistent approach to instrumenting various parts of your FastAPI application.
Key capabilities
- FastAPI middleware integration with OpenTelemetry.
- Automatic instrumentation of FastAPI endpoints.
- Utility functions for creating spans and adding context.
- Common extensions for OTel data propagation in FastAPI applications.
Example prompts
- "Instrument my FastAPI app with OpenTelemetry."
- "Add tracing to the
/usersendpoint using OTel." - "Show me how to propagate context across API calls."
Tips & gotchas
- Requires a working FastAPI application and familiarity with OpenTelemetry concepts.
- Ensure your environment is configured correctly for OpenTelemetry data collection (e.g., an exporter like Jaeger or Prometheus).
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.