Instrumentation Tools & Auto Instrumentation for OpenTelemetry Python
Provides
Requires
License
Apache-2.0
Changelog
* Sun Nov 01 2026 Dirk Müller <dmueller@suse.com>
- update to 0.66b1:
* This is a patch release on the previous 1.45.0/0.66b0
release, fixing the issue(s) below.
* No significant changes.
* Tue Sep 29 2026 Nico Krapp <nico.krapp@suse.com>
- Update to 0.66b0
* ### Added
* opentelemetry-instrumentation-psycopg2, opentelemetry-
instrumentation-psycopg: Add sqlcommenter support for
instrument_connection (#4267)
* opentelemetry-instrumentation-fastapi: Document
auto-instrumentation setup and HTTP/WebSocket trace propagation
opentelemetry-instrumentation: Include the instrumentation
README in API docs (#4555)
* opentelemetry-instrumentation-botocore: capture Bedrock prompt
cache token usage for converse and converse_stream API (#4615)
* opentelemetry-instrumentation-fastapi: advertise inline type
annotations (#4685)
* opentelemetry-instrumentation-kafka-python: Update kafka python
instrumentation to support kafka-python>=3 (#4786)
* opentelemetry-instrumentation-mysql: add semantic convention
stability opt-in mode tests (#4810)
* opentelemetry-instrumentation-aiopg: Add DB client operation
duration and returned rows metrics. (#4826)
* opentelemetry-instrumentation-httpx: support strict typing
* opentelemetry-instrumentation-mysqlclient: add semantic
convention stability opt-in mode tests (#4834)
* opentelemetry-instrumentation-pymysql: add semantic convention
stability opt-in mode tests (#4835)
* opentelemetry-instrumentation-sqlite3: add semantic convention
stability opt-in mode tests (#4836)
* opentelemetry-instrumentation-psycopg: add semantic convention
stability opt-in mode tests (#4838)
* infra: add validation for changelog file format (#4856)
* opentelemetry-instrumentation-aio-pika: bump maximum admissible
aio-pika version to 11.0.0 (#4998)
* ### Changed
* opentelemetry-instrumentation: clarify dependency conflict
messages, in logs and in DependencyConflictError, and promote
auto-instrumentation version conflict logs to error level
* ### Removed
* opentelemetry-instrumentation-kafka-python: drop support for
the deprecated kafka-python-ng fork now that kafka-python is
actively maintained again (#4839)
* opentelemetry-instrumentation-kafka-python: remove unused
KafkaPropertiesExtractor.extract_send_key and
KafkaPropertiesExtractor.extract_send_value helpers (#4858)
* opentelemetry-instrumentation-anthropic, opentelemetry-
instrumentation-claude-agent-sdk, opentelemetry-
instrumentation-langchain, opentelemetry-instrumentation-
weaviate: removed from this repository; these instrumentations
now live in and are maintained from the opentelemetry-python-
genai repository (#4903)
* ### Fixed
* opentelemetry-instrumentation-aws-lambda: support ALB
multiValueHeaders (#4605)
* opentelemetry-instrumentation-redis: extract ClusterPipeline
commands from _execution_strategy in redis-py 6+ so pipeline
span attributes include the queued commands instead of being
empty (#4728)
* opentelemetry-instrumentation-aiopg: fix connection metadata
for manual instrumentation (#4821)
* opentelemetry-instrumentation-redis: treat explicit db=None as
database index 0 (#4828)
* opentelemetry-instrumentation-aws-lambda: use the correct camel
case when accessing the SQS message attributes (#4831)
* opentelemetry-instrumentation-botocore: Restore PyPy test
coverage. (#4841)
* opentelemetry-instrumentation-botocore: don't emit error status
on 3xx ClientError responses (#4851)
* opentelemetry-instrumentation-kafka-python: record the actual
messaging.kafka.partition read back from the producer send()
future, instead of a pre-computed estimate that did not match
the delivered partition for randomly-partitioned messages
* opentelemetry-instrumentation-logging: Promote otel.event.name
to LogRecord.event_name in _translate (#4864)
* opentelemetry-instrumentation-grpc: respect suppressed
instrumentation in server interceptors (#4870)
* opentelemetry-instrumentation-logging: Import code_attributes
from stable semconv package (#4873)
* opentelemetry-instrumentation-asyncio: fix to_thread
instrumentation so spans and duration metrics measure the
actual function execution instead of ending immediately,
repeated calls of the same function are all recorded instead of
only the first one, and failures are recorded with the same
state values (exception, timeout, cancelled) as the coroutine
and future paths; the AsyncioInstrumentor.trace_to_thread
method is renamed to AsyncioInstrumentor.wrap_to_thread_func to
reflect that it now returns a wrapper (#4901)
* opentelemetry-instrumentation-logging: fix documented name of
the code attributes env var to OTEL_PYTHON_LOG_CODE_ATTRIBUTES
* opentelemetry-instrumentation-psycopg: avoid IndexError in
get_operation_name for comment-only or whitespace-only Composed
statements (#4936)
* opentelemetry-instrumentation-psycopg2: avoid IndexError in
get_operation_name for comment-only or whitespace-only
statements (#4942)
* opentelemetry-instrumentation-sqlalchemy: avoid IndexError in
_operation_name for comment-only or whitespace-only statements
* opentelemetry-instrumentation-mysql: support mysql-connector-
python 26.7.0 and later (#4951)
* opentelemetry-util-http: stop _parse_url_query raising on
unparsable urls (#4965)
* opentelemetry-instrumentation-asyncio: fix metric name and
future example in module docs (#5083)
* opentelemetry-instrumentation-pymemcache: honor instrumentation
suppression (#5086)
* opentelemetry-instrumentation-asyncpg: honor instrumentation
suppression (#5087)
* opentelemetry-propagator-ot-trace: cap ot-baggage-* entries on
extract and inject (#5098)
* Tue Jul 07 2026 Dirk Müller <dmueller@suse.com>
- update to 0.64b0:
* ### Added
* `opentelemetry-instrumentation-exceptions`: add
instrumentation to emit OpenTelemetry logs for uncaught
process, thread, and asyncio exceptions.
* `opentelemetry-instrumentation-botocore`: loosen aiobotocore
version constraints to allow for 3.x
* `opentelemetry-instrumentation-logging`: add optional
`inject_trace_context` argument for injecting trace context
attributes
* `opentelemetry-instrumentation-redis`: gracefully handle hook
exceptions
* ### Changed
* opentelemetry-instrumentation-requests: remove multiple calls
to sanitize_method
* ### Fixed
* `opentelemetry-instrumentation-django`: Remove duplicate
query logging in SQLCommenter middleware that broke Django's
`assertNumQueries`
* `opentelemetry-instrumentation-flask`: wrap wsgi_app call in
try/except to prevent active_requests gauge leak
* `opentelemetry-instrumentation-asyncpg`: instrument prepared
statements
* `opentelemetry-instrumentation-aiokafka`, `opentelemetry-
instrumentation-confluent-kafka`, `opentelemetry-
instrumentation-kafka-python`: fix malformed RST formatting
in module docstrings
* `opentelemetry-instrumentation-dbapi`: Fix pyodbc DB-API
instrumentation examples to wrap `connect`.
* `opentelemetry-instrumentation-tornado`: reduce cardinality
of `http.target` metrics attribute with old semantic
conventions
* `opentelemetry-instrumentation-dbapi`: implement proper
handling of t-string queries
* `opentelemetry-instrumentation-fastapi`: fix `AttributeError`
when resolving routes added via `include_router` on FastAPI
0.137+
* `opentelemetry-instrumentation-tornado`: sanitize the request
http method in server and client spans and metrics
* Sat Jun 20 2026 Dirk Müller <dmueller@suse.com>
- update to 0.63b1:
* This is a patch release on the previous 1.42.0/0.63b0
release, fixing the issue(s) below.
- update to 0.63b0:
* ### Added
* `opentelemetry-exporter-richconsole`: Add support for
suppressing resource information
* `opentelemetry-instrumentation`: Add experimental metrics
attributes Labeler utility
* `opentelemetry-instrumentation-logging`: Add
`OTEL_PYTHON_LOG_HANDLER_LEVEL` and `OTEL_PYTHON_LOG_FORMAT`
environment variables to configure the log level and
formatter of the auto-instrumented `LoggingHandler`.
* `opentelemetry-instrumentation-sqlite3`: Add uninstrument,
error status, suppress, and no-op tests
* Add `BaggageLogProcessor` to `opentelemetry-processor-
baggage`
* `opentelemetry-instrumentation-system-metrics`: Add support
for `process.disk.io` metric in system-metrics
instrumentation
* `opentelemetry-instrumentation`: Register
`OTEL_SEMCONV_STABILITY_OPT_IN` in `environment_variables.py`
so `opentelemetry-instrument` exposes a
`--semconv_stability_opt_in` CLI argument
* Expand `AGENTS.md` with instrumentation/GenAI guidance and
add PR review instructions.
* `opentelemetry-instrumentation`: update auto-instrumentation
to re-inject instrumentation path after init
* `opentelemetry-instrumentation-dbapi`: Add Database client
operation duration and returned rows metrics
* ### Changed
* Remove redundant `pylint: disable=attribute-defined-outside-
init` comments and add rule to global `.pylintrc` disable
list
* Bump `pylint` to `4.0.5`
* `opentelemetry-instrumentation-logging`: Use
`LogRecord.getMessage()` to format and extract each log
record's body text to more closely match the expected usage
of the logging system. As a result, all OTel log record
bodies are now always strings. Previously, if `LogRecord.msg`
(which contains the format string) was set to a non-string
object (e.g. `logger.warning(some_dict)`), the object was
exported as-is to the OTLP body field. Now,
`LogRecord.getMessage()` will convert it to to a string. If
you are passing in non-strings as the format string argument
and your backend is expecting them as-is, you will need to
update accordingly.
* Switch to SPDX license headers and add CI enforcement
* `opentelemetry-instrumentation-{urllib,urllib3,requests}`:
switch http mock library from abandoned httpretty to mocket
* ### Removed
* Drop Python 3.9 support
* ### Fixed
* `opentelemetry-instrumentation-aiohttp-server`: Use
`canonical` attribute of the `Resource` as a span name
* Refactor unit tests to allow for population of the random
trace id flag in the `traceparent` header
* `opentelemetry-instrumentation-aws-lambda`: fix improper
handling of header casing
* `opentelemetry-instrumentation-flask`: Clean up environ keys
in `_teardown_request` to prevent duplicate execution
* `opentelemetry-instrumentation-celery`: Coerce non-string
values to strings in `CeleryGetter.get()` to prevent
`TypeError` in `TraceState.from_header()` when Celery request
attributes contain ints
* `opentelemetry-instrumentation-celery`: Coerce timelimit
values to strings in `set_attributes_from_context()` to
prevent mixed-type span attribute warning
* `opentelemetry-instrumentation-fastapi`: Fix `FastAPI`
instrumentation to correctly trace `BackgroundTasks` by
wrapping their execution in a dedicated span, ensuring proper
parent-child relationships and accurate trace timing
* `opentelemetry-instrumentation-flask`: Stop reading the
deprecated (from 3.1) `flask.__version__` attribute; resolve
the Flask version via `importlib.metadata`
* `opentelemetry-instrumentation-confluent-kafka`: Populate
`server.address` and `server.port` span attributes from the
producer/consumer `bootstrap.servers` config; previously
`KafkaPropertiesExtractor.extract_bootstrap_servers` was
defined but never called
* `opentelemetry-instrumentation-dbapi` Use `ObjectProxy`
instead of `BaseObjectProxy` for `TracedCursorProxy` to
restore iterability with wrapt 2.x
* `opentelemetry-instrumentation-pyramid`: add missing
`http.response.status_code` in duration metrics for stable
http semantic conventions
* `opentelemetry-instrumentation-pika` Use `ObjectProxy`
instead of `BaseObjectProxy` for `ReadyMessagesDequeProxy` to
restore iterability with wrapt 2.x
* `docker-tests`: Don't require sudo, debian based distro and
MS SQL ODBC driver to run locally. Instead require docker and
unixodbc
* `opentelemetry-instrumentation-celery`: clear completed task
ids from `task_id_to_start_time`
* `opentelemetry-instrumentation-celery`: add null guards and
type-safe helper handling around Celery context propagation
internals
* `opentelemetry-instrumentation-wsgi`: use `PATH_INFO` and
`QUERY_STRING` for URL attributes instead of parsing
`RAW_URI` or `REQUEST_URI`
* `opentelemetry-instrumentation-mysqlclient`: Update unit
tests to properly validate trace context trace flag values.
* `opentelemetry-instrumentation-pika`: pass destination to
`_enrich_span` instead of `task_name`
* `opentelemetry-instrumentation-tornado`: reduce cardinality
of span names and metrics attributes. This introduces a
breaking change in the metrics attributes for the stable
semantic convention by dropping the out of spec `url.query`
and `url.path` attributes in favor of in-spec `http.route`.
* `opentelemetry-instrumentation-confluent-kafka`: Declare
`opentelemetry-semantic-conventions` as a direct dependency
* `opentelemetry-instrumentation-pymssql`: Fix semconv
stability migration for connection attributes (host, port,
user) set in `wrapped_connection()` to respect
`OTEL_SEMCONV_STABILITY_OPT_IN`. Note: `net.peer.port` is now
emitted as `int` instead of `string` in default mode,
aligning with other DB instrumentations.
* Declare `opentelemetry-semantic-conventions` as a direct
dependency for the aio-pika, logging, pika and system-metrics
instrumentations, since each imports `opentelemetry.semconv`
directly.
- update to opentelemetry-instrumentation-google-genai==0.7b1:
* This is a patch release on the previous 0.7b0 release, fixing
the issue(s) below.
- update to opentelemetry-util-genai==0.4b0:
* Add `AgentInvocation` type with `invoke_agent` span lifecycle
* Add metrics support for EmbeddingInvocation
* Add support for workflow in genAI utils handler.
* Enrich ToolCall type, breaking change: usage of ToolCall
class renamed to ToolCallRequest
* Add EmbeddingInvocation span lifecycle support
* Populate schema_url on metrics
* Add workflow invocation type to genAI utils
* Check if upload works at startup in initializer of the
`UploadCompletionHook`, instead of repeatedly failing on
every upload (#4390).
* Refactor public API: add factory methods (`start_inference`,
`start_embedding`, `start_tool`, `start_workflow`) and
invocation-owned lifecycle (`invocation.stop()` /
`invocation.fail(exc)`); rename `LLMInvocation` →
`InferenceInvocation` and `ToolCall` → `ToolInvocation`.
Existing usages remain fully functional via deprecated
aliases.
* `TelemetryHandler` now accepts a `completion_hook` parameter
and calls it after each LLM invocation, passing inputs,
outputs, the active span, and the log record. Content capture
is enabled automatically when a real hook is configured.
* Add metrics to ToolInvocations
* Wrap completion hooks loaded via `load_completion_hook` so
exceptions raised by `on_completion` are logged and swallowed
instead of propagating to instrumentation call sites.
- update to opentelemetry-instrumentation-openai-v2==2.4b0:
* Migrate experimental path from deprecated `LLMInvocation` to
`InferenceInvocation`, using `handler.start_inference()` and
`invocation.stop()`/`invocation.fail()` directly
* Use `create_duration_histogram` and `create_token_histogram`
from `opentelemetry-util-genai` instea