diff --git a/CHANGELOG.md b/CHANGELOG.md index 1477978..ee644a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.2.0] - 2026-04-20 + +### Added +- **`agent_context()`**: new context manager for OTel GenAI semantic-convention + agent identity attributes (`gen_ai.agent.id`, `gen_ai.agent.name`, + `gen_ai.agent.description`, `gen_ai.agent.version`). All spans created inside + the context are auto-tagged by `Last9SpanProcessor`, matching the shape + OpenAI Agents SDK and `autogen-core` emit natively on their own agent spans. +- `agent_context` composes with `conversation_context()` and + `workflow_context()`; covered by tests for triple-nesting, multi-agent + handoff (same conversation), inner-overrides-outer, and mixed-exit order. + +### Notes +- `agent_name` is the only required argument (per OTel semconv). + `agent_id` / `agent_description` / `agent_version` are optional. +- Native-instrumented agent spans (e.g. AutoGen's `invoke_agent`, + OpenAI Agents SDK) set `gen_ai.agent.*` directly inside the span body and + will override values from `agent_context`. Sibling and child spans still + receive `agent_context`'s values. + ## [1.1.0] - 2026-04-20 ### Added diff --git a/last9_genai/__init__.py b/last9_genai/__init__.py index 470d474..b2073b6 100644 --- a/last9_genai/__init__.py +++ b/last9_genai/__init__.py @@ -34,7 +34,7 @@ For more information, see: https://github.com/last9/python-ai-sdk """ -__version__ = "1.1.0" +__version__ = "1.2.0" __author__ = "Last9 Inc." __license__ = "MIT" diff --git a/pyproject.toml b/pyproject.toml index 33acb41..6ad2a82 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "last9-genai" -version = "1.1.0" +version = "1.2.0" description = "Last9 observability attributes for OpenTelemetry GenAI spans - track costs, workflows, and conversations in LLM applications" readme = "README.md" license = "MIT" diff --git a/setup.py b/setup.py index c61c4bd..d43e2cf 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setup( name="last9-genai", - version="1.1.0", + version="1.2.0", author="Last9 Inc.", author_email="hello@last9.io", description="Last9 observability attributes for OpenTelemetry GenAI spans", diff --git a/uv.lock b/uv.lock index d33ead5..f4343ad 100644 --- a/uv.lock +++ b/uv.lock @@ -794,7 +794,7 @@ wheels = [ [[package]] name = "last9-genai" -version = "1.1.0" +version = "1.2.0" source = { editable = "." } dependencies = [ { name = "opentelemetry-api" },