opentelemetry-instrumentation-pymssql
OpenTelemetry pymssql instrumentation
What it is and what it does
This package integrates pymssql database connections into OpenTelemetry's distributed tracing ecosystem. It automatically captures SQL queries, execution time, and connection details as spans, allowing you to see database activity within your broader observability stack without modifying application code.
It's part of the OpenTelemetry Python contrib ecosystem and depends on opentelemetry-instrumentation-dbapi for the underlying database instrumentation layer. The package is in beta (version 0.65b0), meaning the core functionality is stable but the API may evolve. It supports Python 3.10 through 3.14 and is actively maintained.
Use it for:
- Monitor SQL Server query performance and latency in distributed tracing systems like Jaeger or Datadog.
- Correlate database queries with application logs and metrics for end-to-end observability.
- Debug slow database operations by viewing query spans alongside application traces.
- Track database connection pool usage and query execution patterns in production.
- Integrate SQL Server monitoring into existing OpenTelemetry deployments without code refactoring.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds automatic tracing and monitoring of pymssql database connections to OpenTelemetry, capturing SQL queries and performance metrics without code changes.
Yes, if you use pymssql and need OpenTelemetry integration. Low install friction, active maintenance, no known vulnerabilities, and permissive licensing make it a straightforward addition to observability stacks. Beta status is not a blocker for production use in the OpenTelemetry ecosystem. Install it only if you already have an OpenTelemetry collector or exporter configured to receive the spans.
Install
opentelemetry-instrumentation-pymssql on PyPI
pip
pip install opentelemetry-instrumentation-pymssqluv
uv add opentelemetry-instrumentation-pymssqlpoetry
poetry add opentelemetry-instrumentation-pymssqlInstalling opentelemetry-instrumentation-pymssql
Before you install
Low friction install with three stable OpenTelemetry runtime dependencies. Active maintenance with a recent release (29 days old) and ongoing commits. Beta status indicates the instrumentation is functional but may see API refinements.
License in practice
Apache-2.0 permissive license allows use in commercial and open-source projects with minimal restrictions; you must retain license notices.
Quickstart
pip install opentelemetry-instrumentation-pymssql
from opentelemetry.instrumentation.pymssql import PyMSSQLInstrumentor
PyMSSQLInstrumentor().instrument()
Requires Python 3.10 or later; pymssql library must be installed separately to be instrumented.
Verify before relying
- Whether the instrumentation works with all pymssql versions or has specific compatibility constraints.
- Performance overhead of tracing in production workloads with high query volume.
- Whether sampler configuration and span filtering are documented and supported.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — opentelemetry-api, opentelemetry-instrumentation-dbapi, opentelemetry-instrumentation |
| Maintenance | actively maintained — 29 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 346,811/month — #7,352 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: opentelemetry_instrumentation_pymssql-0.65b0-py3-none-any.whl
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
opentelemetry-instrumentation-psycopgAdds OpenTelemetry tracing instrumentation to…
permissive · top 5,000 on PyPI
pymssqlpymssql provides a Python DB-API interface to…
copyleft · top 1,000 on PyPI
opentelemetry-instrumentation-pymongoAdds automatic tracing and observability…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-pymysqlAdds OpenTelemetry tracing instrumentation to…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-mysqlclientAdds OpenTelemetry tracing instrumentation to…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-sqlite3Adds OpenTelemetry tracing instrumentation to…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-psycopg2Adds distributed tracing instrumentation to…
permissive · top 1,000 on PyPI
opentelemetry-instrumentation-dbapiAdds automatic tracing and observability…
permissive · top 1,000 on PyPI
opentelemetry-instrumentation-sqlalchemyAdds distributed tracing to SQLAlchemy database…
permissive · top 1,000 on PyPI
svqlParses SystemVerilog modules and exposes their…
permissive · top 15,000 on PyPI