Skip to content

Releases: open-telemetry/opentelemetry-python-contrib

Version 1.43.0/0.64b0

Choose a tag to compare

@github-actions github-actions released this 24 Jun 15:19
880e756

Added

  • opentelemetry-instrumentation-exceptions: add instrumentation to emit OpenTelemetry logs for uncaught process, thread, and asyncio exceptions. (#4503)
  • opentelemetry-instrumentation-botocore: loosen aiobotocore version constraints to allow for 3.x (#4601)
  • opentelemetry-instrumentation-logging: add optional inject_trace_context argument for injecting trace context attributes (#4626)
  • opentelemetry-instrumentation-redis: gracefully handle hook exceptions (#4696)

Changed

  • opentelemetry-instrumentation-requests: remove multiple calls to sanitize_method (#4719)

Fixed

  • opentelemetry-instrumentation-django: Remove duplicate query logging in SQLCommenter middleware that broke Django's assertNumQueries (#4367)
  • opentelemetry-instrumentation-flask: wrap wsgi_app call in try/except to prevent active_requests gauge leak (#4433)
  • opentelemetry-instrumentation-asyncpg: instrument prepared statements (#4529)
  • opentelemetry-instrumentation-aiokafka, opentelemetry-instrumentation-confluent-kafka, opentelemetry-instrumentation-kafka-python: fix malformed RST formatting in module docstrings (#4613)
  • opentelemetry-instrumentation-dbapi: Fix pyodbc DB-API instrumentation examples to wrap connect. (#4657)
  • opentelemetry-instrumentation-tornado: reduce cardinality of http.target metrics attribute with old semantic conventions (#4666)
  • opentelemetry-instrumentation-dbapi: implement proper handling of t-string queries (#4697)
  • opentelemetry-instrumentation-fastapi: fix AttributeError when resolving routes added via include_router on FastAPI 0.137+ (#4700)
  • opentelemetry-instrumentation-tornado: sanitize the request http method in server and client spans and metrics (#4735)

Version 1.42.1/0.63b1

Choose a tag to compare

@github-actions github-actions released this 21 May 16:36
8ddb205

This is a patch release on the previous 1.42.0/0.63b0 release, fixing the issue(s) below.

Version 1.42.0/0.63b0

Choose a tag to compare

@github-actions github-actions released this 19 May 09:47
7831241

Added

  • opentelemetry-exporter-richconsole: Add support for suppressing resource information (#3898)
  • opentelemetry-instrumentation: Add experimental metrics attributes Labeler utility (#4288)
  • 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. (#4298)
  • opentelemetry-instrumentation-sqlite3: Add uninstrument, error status, suppress, and no-op tests (#4335)
  • Add BaggageLogProcessor to opentelemetry-processor-baggage (#4371)
  • opentelemetry-instrumentation-system-metrics: Add support for process.disk.io metric in system-metrics instrumentation (#4397)
  • opentelemetry-instrumentation: Register OTEL_SEMCONV_STABILITY_OPT_IN in environment_variables.py so opentelemetry-instrument exposes a --semconv_stability_opt_in CLI argument (#4438)
  • Expand AGENTS.md with instrumentation/GenAI guidance and add PR review instructions. (#4457)
  • opentelemetry-instrumentation: update auto-instrumentation to re-inject instrumentation path after init (#4469)
  • opentelemetry-instrumentation-dbapi: Add Database client operation duration and returned rows metrics (#4481)

Changed

  • Remove redundant pylint: disable=attribute-defined-outside-init comments and add rule to global .pylintrc disable list (#3839)
  • Bump pylint to 4.0.5 (#4244)
  • 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. (#4372)
  • Switch to SPDX license headers and add CI enforcement (#4533)
  • opentelemetry-instrumentation-{urllib,urllib3,requests}: switch http mock library from abandoned httpretty to mocket (#4583)

Removed

  • Drop Python 3.9 support (#4412)

Fixed

  • opentelemetry-instrumentation-aiohttp-server: Use canonical attribute of the Resource as a span name (#3896)
  • Refactor unit tests to allow for population of the random trace id flag in the traceparent header (#4030)
  • opentelemetry-instrumentation-aws-lambda: fix improper handling of header casing (#4216)
  • opentelemetry-instrumentation-flask: Clean up environ keys in _teardown_request to prevent duplicate execution (#4341)
  • 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 (#4360)
  • opentelemetry-instrumentation-celery: Coerce timelimit values to strings in set_attributes_from_context() to prevent mixed-type span attribute warning (#4361)
  • 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 (#4368)
  • opentelemetry-instrumentation-flask: Stop reading the deprecated (from 3.1) flask.__version__ attribute; resolve the Flask version via importlib.metadata (#4422)
  • 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 (#4423)
  • opentelemetry-instrumentation-dbapi Use ObjectProxy instead of BaseObjectProxy for TracedCursorProxy to restore iterability with wrapt 2.x (#4427)
  • opentelemetry-instrumentation-pyramid: add missing http.response.status_code in duration metrics for stable http semantic conventions (#4448)
  • opentelemetry-instrumentation-pika Use ObjectProxy instead of BaseObjectProxy for ReadyMessagesDequeProxy to restore iterability with wrapt 2.x (#4461)
  • docker-tests: Don't require sudo, debian based distro and MS SQL ODBC driver to run locally. Instead require docker and unixodbc (#4478)
  • opentelemetry-instrumentation-celery: clear completed task ids from task_id_to_start_time (#4504)
  • opentelemetry-instrumentation-celery: add null guards and type-safe helper handling around Celery context propagation internals (#4505)
  • opentelemetry-instrumentation-wsgi: use PATH_INFO and QUERY_STRING for URL attributes instead of parsing RAW_URI or REQUEST_URI (#4551)
  • opentelemetry-instrumentation-mysqlclient: Update unit tests to properly validate trace context trace flag values. (#4560)
  • opentelemetry-instrumentation-pika: pass destination to _enrich_span instead of task_name (#4563)
  • 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. (#4577)
  • opentelemetry-instrumentation-confluent-kafka: Declare opentelemetry-semantic-conventions as a direct dependency (#4590)
  • 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. (#4592)
  • Declare opentelemetry-semantic-conventions as a direct dependency for the aio-pika, logging, pika and system-metrics instrumentations, since each imports opentelemetry.semconv directly. (#4594)

opentelemetry-instrumentation-google-genai 0.7b1

Choose a tag to compare

@github-actions github-actions released this 19 May 01:46
3b3502d

This is a patch release on the previous 0.7b0 release, fixing the issue(s) below.

opentelemetry-util-genai 0.4b0

Choose a tag to compare

@github-actions github-actions released this 01 May 17:29
57d207b
  • Add AgentInvocation type with invoke_agent span lifecycle (#4274)
  • Add metrics support for EmbeddingInvocation (#4377)
  • Add support for workflow in genAI utils handler. (#4366)
  • Enrich ToolCall type, breaking change: usage of ToolCall class renamed to ToolCallRequest (#4218)
  • Add EmbeddingInvocation span lifecycle support (#4219)
  • Populate schema_url on metrics (#4320)
  • Add workflow invocation type to genAI utils (#4310)
  • 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 LLMInvocationInferenceInvocation and ToolCallToolInvocation. Existing usages remain fully functional via deprecated aliases. (#4391)
  • 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. (#4315)
  • Add metrics to ToolInvocations (#4443)
  • 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.

opentelemetry-instrumentation-openai-v2 2.4b0

Choose a tag to compare

@github-actions github-actions released this 01 May 17:41
f691ef4
  • Migrate experimental path from deprecated LLMInvocation to InferenceInvocation, using handler.start_inference() and invocation.stop()/invocation.fail() directly (#4502)
  • Use create_duration_histogram and create_token_histogram from opentelemetry-util-genai instead of defining bucket boundaries locally (#4501)
  • Import OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT from opentelemetry.util.genai.environment_variables instead of re-defining it locally, making opentelemetry-util-genai the single source of truth for this constant. (#4455)
  • Fix compatibility with wrapt 2.x by using positional arguments in wrap_function_wrapper() calls (#4445)
  • Fix ChoiceBuffer crash on streaming tool-call deltas with arguments=None (#4350)
  • Fix StreamWrapper missing .headers and other attributes when using with_raw_response streaming (#4113)
  • Add opt-in support for latest experimental semantic conventions (v1.37.0). Set OTEL_SEMCONV_STABILITY_OPT_IN to gen_ai_latest_experimental to enable. Add dependency on opentelemetry-util-genai pypi package. (#3715)
  • Add wrappers for OpenAI Responses API streams and response stream managers (#4280)
  • Add async wrappers for OpenAI Responses API streams and response stream managers (#4325)
  • Add strongly typed Responses API extractors with validation and content extraction improvements (#4337)
  • Add completion hook support. (#4315)
  • Fix response_format handling: map json_object/json_schema to json output type. (#4315)
  • Skip attribute values with openai.Omit value. (#4315)
  • Default empty string for gen_ai.request.model attribute on missing model. (#4494)

Version 1.41.1/0.62b1

Choose a tag to compare

@github-actions github-actions released this 24 Apr 13:23
beabf56

This is a patch release on the previous 1.41.0/0.62b0 release, fixing the issue(s) below.

Fixed

  • opentelemetry-instrumentation-pika Use ObjectProxy instead of BaseObjectProxy for ReadyMessagesDequeProxy to restore iterability with wrapt 2.x (#4461)
  • opentelemetry-instrumentation-dbapi Use ObjectProxy instead of BaseObjectProxy for TracedCursorProxy to restore iterability with wrapt 2.x (#4427)

Version 1.41.0/0.62b0

Choose a tag to compare

@github-actions github-actions released this 09 Apr 14:41
e8b9043

Added

  • opentelemetry-instrumentation-asgi: Respect suppress_http_instrumentation context in ASGI middleware to skip server span creation when HTTP instrumentation is suppressed (#4375)
  • opentelemetry-instrumentation-confluent-kafka: Loosen confluent-kafka upper bound to <3.0.0 (#4289)
  • opentelemetry-instrumentation: Add support for wrapt 2.x (#4203)
  • opentelemetry-instrumentation-psycopg2: Add parameter capture_parameters to instrumentor. (#4212)
  • opentelemetry-instrumentation-botocore: Add support for instrumenting aiobotocore (#4049)
  • opentelemetry-instrumentation-sqlalchemy: implement new semantic convention opt-in migration (#4110)

Fixed

  • opentelemetry-docker-tests: Replace deprecated SpanAttributes from opentelemetry.semconv.trace with opentelemetry.semconv._incubating.attributes (#4339)
  • opentelemetry-instrumentation-confluent-kafka: Skip recv span creation when poll() returns no message or consume() returns an empty list, avoiding empty spans on idle polls (#4349)
  • Fix intermittent Core Contrib Test CI failures caused by GitHub git CDN SHA propagation lag by installing core packages from the already-checked-out local copy instead of a second git clone (#4305)
  • Don't import module in unwrap if not already imported (#4321)
  • opentelemetry-instrumentation-logging: Map Python CRITICAL log level to OTel FATAL severity text and WARNING to WARN (#4365)
  • opentelemetry-instrumentation-logging: Add recursion guard in LoggingHandler.emit to prevent deadlock (#4302)
  • opentelemetry-instrumentation-grpc: Fix bidirectional streaming RPCs raising AttributeError: 'generator' object has no attribute 'add_done_callback' (#4259)
  • opentelemetry-instrumentation-aiokafka: fix Unclosed AIOKafkaProducer warning and RuntimeWarning: coroutine was never awaited in tests (#4384)
  • opentelemetry-instrumentation-aiokafka: Fix compatibility with aiokafka 0.13 by calling _key_serializer/_value_serializer directly instead of the internal _serialize method whose signature changed in 0.13 from (topic, key, value) to (key, value, headers) (#4379)

Breaking changes

  • opentelemetry-instrumentation-boto: Remove instrumentation (#4303)

opentelemetry-opamp-client 0.2b0

Choose a tag to compare

@github-actions github-actions released this 01 Apr 13:30
98545aa
  • Breaking change: callback class Callbacks renamed to OpAMPCallbacks (#4355)

opentelemetry-opamp-client 0.1b0

Choose a tag to compare

@github-actions github-actions released this 23 Mar 15:30
23f7540
  • Initial implementation (#3635)
  • Update client to have additional callback methods (#4322)