OpenTracing middleware for FastAPI applications with Kubernetes and Istio support.
fastapi-opentracing is a middleware package that adds OpenTracing support to FastAPI applications. It enables distributed tracing across microservices, helping developers track request flows and identify performance bottlenecks in complex systems. The library integrates with Kubernetes and Istio environments for seamless tracing in cloud-native applications.
Backend developers building FastAPI microservices that require distributed tracing capabilities, particularly those deploying to Kubernetes with Istio service mesh.
Provides a simple, focused solution for adding OpenTracing to FastAPI applications without the overhead of larger observability frameworks, with built-in support for database query tracing and Istio integration.
fastapi opentracing middleware works on k8s
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Setup is straightforward with a simple middleware addition, as shown in the minimal example code requiring just a few lines to start tracing HTTP requests.
Designed to work seamlessly with Istio service mesh, enhancing tracing in Kubernetes environments without extra configuration, as highlighted in the project description.
Includes patches for Tortoise-ORM and MySQL client, automatically tracing SQL queries to provide deeper insights into performance bottlenecks, with examples for install_patch and install_all_patch.
Automatically extracts and injects span headers using get_opentracing_span_headers, ensuring distributed tracing context is maintained across microservice boundaries.
Based on OpenTracing, which has been largely superseded by OpenTelemetry, potentially limiting future support, community adoption, and compatibility with modern observability tools.
Only provides hooks for Tortoise-ORM and MySQL; users of SQLAlchemy, PostgreSQL, or other systems must implement custom solutions, as admitted in the limited patch options.
The README offers basic examples but lacks comprehensive guides, configuration details, or troubleshooting advice, which could hinder implementation and debugging efforts.