Releases: open-telemetry/opentelemetry-python-contrib
Releases · open-telemetry/opentelemetry-python-contrib
opentelemetry-util-genai 0.4b0
- Add
AgentInvocationtype withinvoke_agentspan 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)); renameLLMInvocation→InferenceInvocationandToolCall→ToolInvocation. Existing usages remain fully functional via deprecated aliases. (#4391) TelemetryHandlernow accepts acompletion_hookparameter 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_hookso exceptions raised byon_completionare logged and swallowed instead of propagating to instrumentation call sites.
opentelemetry-instrumentation-openai-v2 2.4b0
- Migrate experimental path from deprecated
LLMInvocationtoInferenceInvocation, usinghandler.start_inference()andinvocation.stop()/invocation.fail()directly (#4502) - Use
create_duration_histogramandcreate_token_histogramfromopentelemetry-util-genaiinstead of defining bucket boundaries locally (#4501) - Import
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENTfromopentelemetry.util.genai.environment_variablesinstead of re-defining it locally, makingopentelemetry-util-genaithe 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
ChoiceBuffercrash on streaming tool-call deltas witharguments=None(#4350) - Fix
StreamWrappermissing.headersand other attributes when usingwith_raw_responsestreaming (#4113) - Add opt-in support for latest experimental semantic conventions (v1.37.0). Set
OTEL_SEMCONV_STABILITY_OPT_INtogen_ai_latest_experimentalto enable. Add dependency onopentelemetry-util-genaipypi 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_formathandling: mapjson_object/json_schematojsonoutput type. (#4315) - Skip attribute values with
openai.Omitvalue. (#4315) - Default empty string for
gen_ai.request.modelattribute on missing model. (#4494)
Version 1.41.1/0.62b1
This is a patch release on the previous 1.41.0/0.62b0 release, fixing the issue(s) below.
Fixed
Version 1.41.0/0.62b0
Added
opentelemetry-instrumentation-asgi: Respectsuppress_http_instrumentationcontext 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 parametercapture_parametersto instrumentor. (#4212)opentelemetry-instrumentation-botocore: Add support for instrumentingaiobotocore(#4049)opentelemetry-instrumentation-sqlalchemy: implement new semantic convention opt-in migration (#4110)
Fixed
opentelemetry-docker-tests: Replace deprecatedSpanAttributesfromopentelemetry.semconv.tracewithopentelemetry.semconv._incubating.attributes(#4339)opentelemetry-instrumentation-confluent-kafka: Skiprecvspan creation whenpoll()returns no message orconsume()returns an empty list, avoiding empty spans on idle polls (#4349)- Fix intermittent
Core Contrib TestCI 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 PythonCRITICALlog level to OTelFATALseverity text andWARNINGtoWARN(#4365)opentelemetry-instrumentation-logging: Add recursion guard in LoggingHandler.emit to prevent deadlock (#4302)opentelemetry-instrumentation-grpc: Fix bidirectional streaming RPCs raisingAttributeError: 'generator' object has no attribute 'add_done_callback'(#4259)opentelemetry-instrumentation-aiokafka: fixUnclosed AIOKafkaProducerwarning andRuntimeWarning: coroutine was never awaitedin tests (#4384)opentelemetry-instrumentation-aiokafka: Fix compatibility with aiokafka 0.13 by calling_key_serializer/_value_serializerdirectly instead of the internal_serializemethod 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
- Breaking change: callback class
Callbacksrenamed toOpAMPCallbacks(#4355)
opentelemetry-opamp-client 0.1b0
Version 1.40.0/0.61b0
Added
- Add Python 3.14 support (#4193)
opentelemetry-instrumentation-asgi: Add exemplars forhttp.server.request.durationandhttp.server.durationmetrics (#3739)opentelemetry-instrumentation-wsgi: Add exemplars forhttp.server.request.durationandhttp.server.durationmetrics (#3739)opentelemetry-instrumentation-aiohttp-client: add ability to capture custom headers (#3988)opentelemetry-instrumentation-requests: add ability to capture custom headers (#3987)opentelemetry-instrumentation-aiohttp-client: add typechecking for aiohttp-client instrumentation (#4006)opentelemetry-instrumentation-flask: Add support for 3.1+ streaming responses (#3938)opentelemetry-instrumentation-aiohttp-server: Support passingTracerProviderwhen instrumenting. (#3819)opentelemetry-instrumentation-system-metrics: Add support for theOTEL_PYTHON_SYSTEM_METRICS_EXCLUDED_METRICSenvironment variable (#3959)opentelemetry-instrumentation-httpx: add ability to capture custom headers (#4047)opentelemetry-instrumentation-urllib3: add ability to capture custom headers (#4050)opentelemetry-instrumentation-urllib: add ability to capture custom headers (#4051)opentelemetry-instrumentation-confluent-kafka: Increase confluent-kafka upper bound to support newer versions (2.13.0) (#4099)opentelemetry-instrumentation-aiohttp-serverImplement new semantic convention opt-in migration (#3980)opentelemetry-instrumentation-falcon: pass request attributes at span creation (#4119)opentelemetry-instrumentation: add database stability attribute setters in_semconvutilities (#4108)opentelemetry-instrumentation-aiohttp-server: pass request attributes at span creation (#4118)opentelemetry-instrumentation-tornado: Implement new semantic convention opt-in migration (#3993)opentelemetry-instrumentation-tornado: pass request attributes at span creation (#4140)opentelemetry-instrumentation-pyramidImplement new semantic convention opt-in migration (#3982)opentelemetry-instrumentation-tortoiseormAdd unit tests for Tortoise ORM instrumentation (#4141)opentelemetry-instrumentation-pyramid: pass request attributes at span creation (#4139)opentelemetry-instrumentation-logging: Move there the SDK LoggingHandler (#4210)- Add stale PR GitHub Action (#4220)
Fixed
opentelemetry-instrumentation-flask: Alignhttp.server.active_requestsinitialization with semantic convention helpers to ensure consistent names, units, and descriptions. (#4094)opentelemetry-instrumentation-asyncio: Fix environment variables not appearing in Read the Docs documentation (#4256)opentelemetry-instrumentation-mysql: Refactor MySQL integration test mocks to use concrete DBAPI connection attributes, reducing noisy attribute type warnings. (#4116)opentelemetry-instrumentation-cassandra: Use_instruments_anyinstead of_instrumentsfor driver dependencies so that having eithercassandra-driverorscylla-driverinstalled is sufficient (#4182)opentelemetry-instrumentation-asyncpg: Hydrate span attributes before creation so samplers can filter on database details (#3841)opentelemetry-instrumentation-django: Fix exemplars generation forhttp.server.(request.)duration(#3945)opentelemetry-util-http,opentelemetry-instrumentation-requests,opentelemetry-instrumentation-wsgi,opentelemetry-instrumentation-asgi: normalize byte-valued user-agent headers before detecting synthetic sources so attributes are recorded reliably. (#4001)opentelemetry-instrumentation-psycopg: Fixinstrument_connectionmethod to use_new_cursor_async_factoryon async connections. (#3956)opentelemetry-instrumentation-dbapi: Replace SpanAttributes with semconv constants where applicable (#4058)opentelemetry-instrumentation-django: Replace SpanAttributes with semconv constants where applicable (#4059)opentelemetry-instrumentation-botocore: Replace SpanAttributes with semconv constants where applicable (#4063)opentelemetry-instrumentation-celery: Replace SpanAttributes with semconv constants where applicable (#4056)opentelemetry-instrumentation-confluent-kafka: Replace SpanAttributes with semconv constants where applicable (#4057)opentelemetry-instrumentation-cassandra: Replace SpanAttributes with semconv constants for DB attributes (#4055)opentelemetry-instrumentation-falcon: Replace SpanAttributes with semconv constants (#4066)opentelemetry-instrumentation-pika: Replace SpanAttributes with semconv constants for net attributes (#4068)opentelemetry-instrumentation-mysqlclient: Replace SpanAttributes with semconv constants (#4067)opentelemetry-instrumentation-pymemcache: Remove span attributes pymemcache (#4076)opentelemetry-instrumentation-pymongo: Replace SpanAttributes with semconv constants (#4077)opentelemetry-instrumentation-pymysql: Replace SpanAttributes with semconv constants (#4078)opentelemetry-instrumentation-pyramid: Replace SpanAttributes with semconv constants (#4079)opentelemetry-instrumentation-tortoiseorm: Replace SpanAttributes with semconv constants (#4080)opentelemetry-instrumentation-asgi: Replace SpanAttributes with semconv constants (#4081)opentelemetry-instrumentation-system-metrics: Use proper numericcpython.gc.generationattribute in CPython metrics, out of specgenerationattribute is deprecated and will be removed in the future (#4092)opentelemetry-instrumentation-dbapi: Fix sqlcomment calculation of mysql_client_version field if connection reassignment, with "unknown" fallback (#3729)opentelemetry-instrumentation-confluent-kafka: Fix incorrect number of argument to_inner_wrap_close(#3922)opentelemetry-instrumentation-urllib3: fix multiple arguments error (#4144)opentelemetry-instrumentation-psycopg: Fix instrument of typed psycopg sql (#4078)opentelemetry-instrumentation-aiohttp-server: fix HTTP error inconsistencies ([#4175...
opentelemetry-util-genai 0.3b0
- Add
gen_ai.tool_definitionsto completion hook (#4181) - Add support for emitting inference events and enrich message types. (#3994)
- Add support for
server.address,server.porton all signals and additional metric-only attributes (#4069) - Log error when
fsspecfails to be imported instead of silently failing (#4037). - Minor change to check LRU cache in Completion Hook before acquiring semaphore/thread (#3907).
- Add environment variable for genai upload hook queue size (https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3943)
- Add more Semconv attributes to LLMInvocation spans. (https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3862)
- Limit the upload hook thread pool to 64 workers (https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3944)
- Add metrics to LLMInvocation traces (https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3891)
- Add parent class genAI invocation (https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3889)