Releases: open-telemetry/opentelemetry-python-genai
Releases · open-telemetry/opentelemetry-python-genai
Release list
opentelemetry-instrumentation-google-genai 1.0b1
This is a patch release on the previous 1.0b0 release, fixing the issue(s) below.
Added
- Add Weaver conformance test scenarios for
generate_content,interactions.create, andembed_content. (#232)
Changed
- Bump dependencies: opentelemetry-api from ~= 1.40 to ~= 1.43, opentelemetry-instrumentation and opentelemetry-semantic-conventions from >= 0.61b0 to >= 0.64b0, and opentelemetry-util-genai from >= 0.4b0 to >= 1.0b0. (#244)
- Bump minimum required version of
opentelemetry-apito1.43.0,opentelemetry-instrumentation/opentelemetry-semantic-conventionsto0.64b0, andwraptto1.17.0. (#254)
Fixed
opentelemetry-util-genai 1.0b0
Added
- Add
tool_resultas a parameter toToolInvocation, addtool_resultandargumentsas span attributes to theexecute_toolspan ifContentCaptureflag is set. (#17) - Add
RetrievalInvocationtype withstart_retrieval/retrievalspan lifecycle, supportinggen_ai.operation.name=retrievalspans per the GenAI semantic conventions. (#36) - Add shared sync and async stream wrapper base classes for GenAI instrumentations. (#4500)
Changed
- Bumped the version to
1.0b0to align with the OpenTelemetry GenAI packages. (#60) - Use
AttributeValueinstead ofAnyfor span and metric attribute types inGenAIInvocationand its subclasses. (#153) - Apply attribute for sampling on instantiation of all invocation types. (#4553)
- Change
InferenceInvocationinit params to only accept base params - Minor code cleanup and changes in preparation of moving google's GenAI instrumentation library to use this util library (#4556)
- Pass in
attributeson invocation_startso samplers have access to attributes. (#4538)
Deprecated
- Deprecate all
start_factories; update allinvocationfactories to return objects that can be used as context managers. (#17)
Removed
- Remove remaining usages of and references to deprecated functions (#47)
- Removes all code referencing the "OTEL_SEMCONV_STABILITY_OPT_IN" flag, as we are removing all code that sits behind the "default" value of that flag, and having the code that sits behind "experimental" be the default. (#117)
- Removed the
providerparameter from the internal agent invocation APIs and stopped emittinggen_ai.provider.nameon internal agent spans and metrics. (#132)
opentelemetry-instrumentation-google-genai 1.0b0
Added
- Added missing
gen_ai.response.idattribute to span and event. (#119) - Add instrumentation for InteractionsResource.create and AsyncInteractionsResource.create. (#165)
- Add telemetry support for the Google GenAI SDK embedding API (embed_content and embed_content_async). (#176)
- Record response model (
gen_ai.response.model) attribute on inference span. (#205) - Add
gen_ai.usage.cache_read.input_tokensattribute to capture cached tokens on spans/events when the experimental sem conv flag is set. (#4313) - Add
gen_ai.usage.reasoning.output_tokensattribute to capture thinking tokens on spans/events when the experimental sem conv flag is set. Add thinking tokens to output tokens. (#4313)
Changed
- Refactor code to make use of the shared GenAi Utils package
opentelemetry-util-genai. This shared package is used by multiple GenAI instrumentations, and ensures sem convs are followed and up to date. This does result in some span attributes on theexecute_toolspan being removed (code.function.parameters.someparam.type,code.function.parameters.someparam.valueetc.), and other sem conv compliant attributes being added to the span (specifically:gen_ai.tool.call.arguments,gen_ai.tool.call.result), it also correctly changes theSpanKindfromINTERNALtoCLIENT. Thegenerate_contentspan also is switched toSpanKindCLIENT, and thegen_ai.provider.nameattribute which was missing has been added, its value isvertex_ai. TheInstrumentationScopeof the log and trace will also change, as theTelemetryHandlerclass in the utils package is now used to write the logs and traces. (#10) - Relax version constraint of
google-genaito allow v2 of that library to be used with the instrumentation library. (#21) - Bumped the version to
1.0b0to align with the OpenTelemetry GenAI packages. (#60) - Use
wraptinstead offunctools.wrapsto monkey patch the SDK. (#151) - Update the
generate_contentstreaming method variants to return streaming wrapper classes to enable users to iterate over the stream of responses from the model. (#167)
Removed
- Remove the code supporting the old semantic conventions, and the
OTEL_SEMCONV_STABILITY_OPT_INflag that was gating the new conventions. The newest conventions will be used by default. (#110)
Fixed
- Fix VCR cassette lookup for Google GenAI upload hook tests under newer pytest versions. (#133)
opentelemetry-instrumentation-genai-openai 1.0b0
Added
- Add instrumentation for
chat.completions.parse()structured outputs (#18) - Add instrumentation for OpenAI Responses API async
create(#99) - Add OpenAI Responses API stream instrumentation for sync and async clients. (#131)
- Pass tool definitions from
toolskwarg toInferenceInvocation.tool_definitionssogen_ai.tool.definitionsspan attribute is populated on chat completion spans (#4554)
Changed
- Renamed package from
opentelemetry-instrumentation-openai-v2toopentelemetry-instrumentation-genai-openai(importsopentelemetry.instrumentation.genai.openai); the version line restarts at1.0b0. (#60) - Use shared GenAI stream wrappers for Responses API streams. (#92)
- Switch OpenAI instrumentation and tests to the latest GenAI semantic convention mode. (#108)
- Migrate OpenAI embeddings instrumentation to the shared util-genai EmbeddingInvocation lifecycle and drop the legacy embeddings-specific span/metrics plumbing. (#127)
- Refactor chat completion stream wrappers to use shared GenAI stream lifecycle helpers. (#4500)
Removed
- Remove unused legacy event helpers that emitted the deprecated
gen_ai.systemattribute andgen_ai.{role}.message/gen_ai.choiceevents. (#161)
Fixed
- Migrate OpenAI choice_count to use InferenceInvocation.request_choice_count field for consistency with other instrumentations. (#192)
opentelemetry-instrumentation-genai-openai-agents 1.0b0
Added
- Document official package metadata and README for the OpenAI Agents instrumentation. (#3859)
- Populate instructions and tool definitions from Response obj. (#4196)
Changed
- Renamed package from
opentelemetry-instrumentation-openai-agents-v2toopentelemetry-instrumentation-genai-openai-agents(importsopentelemetry.instrumentation.genai.openai_agents); the version line restarts at1.0b0. (#60) - Switch instrumentation to use util-genai instead of hand-rolled signals. Stop capturing chat, embeddings, speech, and transcription spans — those are covered by the OpenAI instrumentation. Remove handoff and guardrail spans (not yet defined in semantic convention and not implemented by genai-util). (#90)
- Align AgentSpanData test stubs and span processor with real OpenAI Agents SDK; remove non-existent
operation,description,agent_id, andmodelfields. (#4229)
opentelemetry-instrumentation-genai-langchain 1.0b0
Added
- Add LangChain workflow and agent span support (#25)
- Added tool spans and captured tool definitions on inference spans. (#37)
- Added log and metrics provider to langchain genai utils handler (#4214)
- Added span support for GenAI LangChain LLM invocation. (#3665)
- Added support to call genai utils handler for langchain LLM invocations. (#3889)
Changed
- Renamed package to
opentelemetry-instrumentation-genai-langchain(importsopentelemetry.instrumentation.genai.langchain). (#60) - Update langchain instrumentation to use latest semantic conventions (#129)
Removed
- Stopped setting
gen_ai.provider.nameon internal agent spans. (#132) - Removed the unused span_manager.py from the langchain instrumentation (#190)
Fixed
- Fix compatibility with wrapt 2.x by using positional arguments in
wrap_function_wrapper()calls (#4445)
opentelemetry-instrumentation-genai-anthropic 1.0b0
Added
- instrument async Anthropic messages.create calls (#96)
- Add Anthropic instrumentation for Messages.parse, AsyncMessages.parse, and AsyncMessages.stream. (#191)
- Add async Anthropic message stream wrappers and manager wrappers, with wrapper tests (#4346) -
AsyncMessagesStreamWrapperfor async message stream telemetry -AsyncMessagesStreamManagerWrapperfor asyncMessages.stream()telemetry - Add instrumentation for Anthropic
Messages.stream()helper method (#4499) - Add sync streaming support for
Messages.create(stream=True)andMessages.stream()(#4155) -StreamWrapperfor handlingMessages.create(stream=True)telemetry -MessageStreamManagerWrapperfor handlingMessages.stream()telemetry -MessageWrapperfor non-streaming response telemetry extraction - Implement sync
Messages.createinstrumentation with GenAI semantic convention attributes (#4034) - Captures request attributes:gen_ai.request.model,gen_ai.request.max_tokens,gen_ai.request.temperature,gen_ai.request.top_p,gen_ai.request.top_k,gen_ai.request.stop_sequences- Captures response attributes:gen_ai.response.id,gen_ai.response.model,gen_ai.response.finish_reasons,gen_ai.usage.input_tokens,gen_ai.usage.output_tokens- Error handling witherror.typeattribute - Minimum supported anthropic version is 0.16.0 (SDK uses modernanthropic.resources.messagesmodule structure introduced in this version) - Initial implementation of Anthropic instrumentation (#3978)
Changed
- Renamed package to
opentelemetry-instrumentation-genai-anthropic(importsopentelemetry.instrumentation.genai.anthropic). (#60) - Use shared GenAI stream wrappers for Messages API streams. (#92)
- Update
opentelemetry-util-genaidependency range to>= 0.4b0.dev, <0.5b0(#4520)