--- id: opentelemetry-instrumentation-tortoiseorm version: "0.65b0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # opentelemetry-instrumentation-tortoiseorm — OpenTelemetry Instrumentation for Tortoise ORM License: permissive · Maintenance: active · Downloads: 4.2M/mo ## What it is and what it does This package integrates Tortoise ORM with OpenTelemetry's distributed tracing framework, automatically capturing database queries as spans. It works with MySQL, PostgreSQL, and SQLite backends, allowing you to observe query execution within your broader observability pipeline. The instrumentation is part of the OpenTelemetry Python contrib ecosystem and requires the core opentelemetry-api, opentelemetry-instrumentation, and opentelemetry-semantic-conventions libraries. When installed and initialized, it hooks into Tortoise ORM's query execution layer to emit trace spans. This is useful for debugging slow queries, correlating database activity with application logs and metrics, and understanding request flow in microservices. The package is in beta status (version 0.65b0) but actively maintained, with recent releases and no known security vulnerabilities. Use it for: - Trace Tortoise ORM queries in a microservices architecture to correlate database calls with upstream requests. - Debug slow database operations by examining query spans in your OpenTelemetry backend (Jaeger, Datadog, etc.). - Monitor query patterns and performance across MySQL, PostgreSQL, or SQLite in production systems. - Integrate Tortoise ORM observability into an existing OpenTelemetry instrumentation strategy. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Adds distributed tracing to Tortoise ORM queries across MySQL, PostgreSQL, and SQLite backends using OpenTelemetry instrumentation. Yes, if you use Tortoise ORM and have an OpenTelemetry observability setup. The package has low install friction, active maintenance, permissive licensing, and no security issues. The beta status is not a blocker for most use cases, though you should verify compatibility with your specific Tortoise ORM version and test in a staging environment first. ## Install pip install opentelemetry-instrumentation-tortoiseorm uv add opentelemetry-instrumentation-tortoiseorm poetry add opentelemetry-instrumentation-tortoiseorm ## Installing opentelemetry-instrumentation-tortoiseorm Before you install: Low friction install with three lightweight OpenTelemetry dependencies. Actively maintained with recent releases; repository is current and well-established within the OpenTelemetry project. License in practice: Apache-2.0 permissive license allows commercial use, modification, and redistribution with minimal restrictions—suitable for most projects. Quickstart: pip install opentelemetry-instrumentation-tortoiseorm from opentelemetry.instrumentation.tortoiseorm import TortoiseORMInstrumentor TortoiseORMInstrumentor().instrument() Requires Python 3.10 or later; Tortoise ORM must be installed and configured separately. Verify before relying: - Specific span attributes and query context captured by the instrumentation - Performance overhead of instrumentation on typical query workloads - Compatibility with Tortoise ORM versions beyond the instrumentation's release date ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 4.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags tortoise orm tracing, opentelemetry database instrumentation, orm query tracing, distributed tracing sql, tortoise orm observability, database query spans, opentelemetry instrumentation, observability, tracing, orm [View on SkillFed](https://skillfed.io/packages/opentelemetry-instrumentation-tortoiseorm) · [View on PyPI](https://pypi.org/project/opentelemetry-instrumentation-tortoiseorm/)