Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
f8656f0
Add embedding invocation type
shuningc Feb 19, 2026
69d5598
pre-commit fix
shuningc Feb 19, 2026
c202f8b
Reverting unnecessary changes and dealing with comments
shuningc Feb 19, 2026
a799410
Dealing with comments
shuningc Feb 20, 2026
e16f49f
Refactoring to remove duplicate codes
shuningc Feb 25, 2026
3a4577c
Moving common attributes to GenAIInvocation
shuningc Feb 25, 2026
8e388c0
Apply suggestion from @xrmx
shuningc Mar 2, 2026
cafa8e3
Require virtualenv<21 for tox -e generate (#4265)
xrmx Feb 26, 2026
c969470
fix(threading): attribute error when run is called w/o start (#4246)
dinmukhamedm Feb 26, 2026
41166d8
[google-genai] Test instrumentation on google-genai v1.64.0 (#4253)
Rima-ag Feb 27, 2026
a026ef6
confluent-kafka: add basic autoinstrumentation tests (#4266)
xrmx Feb 27, 2026
1855b3a
instrumentation-genai: stop setting OTEL_PYTHON_LOGGING_AUTO_INSTRUME…
xrmx Feb 27, 2026
9989958
Add Keith Decker to approvers (#4273)
xrmx Mar 2, 2026
6ec1336
asyncio: fix environment variables not appearing in docs (#4261)
srikaaviya Mar 2, 2026
b71eef0
maint: Add stale github action (#4220)
MikeGoldsmith Mar 2, 2026
1bc4001
fix(flask): align http.server.active_requests metric with semconv hel…
rite7sh Mar 2, 2026
5d5b7dd
Fix falcon-instrumentation _handle_exception method to remove pylint …
srikaaviya Mar 2, 2026
2dc8bfb
gen-requirements: drop virtualenv limit (#4271)
xrmx Mar 2, 2026
45fa111
Fix psycopg2 (un)instrument_connection to use weakref, not mutate con…
tammy-baylis-swi Mar 3, 2026
8e64458
Move logger handlers to opentelemetry-instrumentation-logging (#4210)
xrmx Mar 3, 2026
5fc5874
OpenAI v2 onboard onto semantic conventions 1.37.0: chat history and …
lmolkova Mar 3, 2026
9b71c46
CHANGELOG: fix stale action entry (#4291)
xrmx Mar 4, 2026
a2612ba
Update version to 1.41.0.dev/0.62b0.dev (#4294)
otelbot[bot] Mar 4, 2026
da7d578
eachdist: add missing genai packages in independently released packag…
xrmx Mar 4, 2026
76f40dd
Refactoring attributes for embedding type
shuningc Mar 5, 2026
312c697
Merge branch 'main' into adding-embedding-type
shuningc Mar 5, 2026
1384bfd
Removing unnecessary comments
shuningc Mar 5, 2026
026f05f
Merge branch 'main' into adding-embedding-type
shuningc Mar 5, 2026
1621711
Adding error path unit test, moving operation name back to each invoc…
shuningc Mar 9, 2026
d49085c
Making operation name immutable for each type
shuningc Mar 9, 2026
bb21996
Revert "Making operation name immutable for each type"
shuningc Mar 10, 2026
cfbf30f
Merge branch 'main' into adding-embedding-type
shuningc Mar 10, 2026
7bc4233
Updating dependencies for different instrumentation packages, fixing …
shuningc Mar 12, 2026
753fee2
Merge branch 'main' into adding-embedding-type
shuningc Mar 12, 2026
7ab292d
Fixing conflict
shuningc Mar 12, 2026
28a7d93
Fixing failed tests out of dependencies and typo
shuningc Mar 12, 2026
3a9045d
Fixing failed tests by splitting large files and updating dependencies
shuningc Mar 12, 2026
9b78bc2
Keeping only generic start,stop and fail methods for all invocation t…
shuningc Mar 12, 2026
1e5f50c
Simplified error type calculation and refactor tests
shuningc Mar 12, 2026
0238075
Merge branch 'main' into adding-embedding-type
shuningc Mar 13, 2026
f7415f8
Merge branch 'main' into adding-embedding-type
shuningc Mar 17, 2026
dbce15f
Reverting start_[type] methods removals, fixing some related tests
shuningc Mar 19, 2026
a58b540
Removing start_embedding, stop_embedding and fail_embedding methods
shuningc Mar 19, 2026
6dfa5f0
Adding one missing change
shuningc Mar 19, 2026
6684f5a
Merge branch 'main' into adding-embedding-type
shuningc Mar 19, 2026
c5eb2f5
ruff format fix
shuningc Mar 19, 2026
0b93488
Merge branch 'main' into adding-embedding-type
xrmx Mar 20, 2026
c5bb5c6
Adding one format fix
shuningc Mar 20, 2026
7aae7e3
Merge branch 'main' into adding-embedding-type
keith-decker Mar 24, 2026
6a9875c
Merge branch 'main' into adding-embedding-type
shuningc Mar 25, 2026
742812a
Reverting opentelemetry-instrumentation version to 0.60b.0 and opente…
shuningc Mar 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,14 @@ classifiers = [
"Programming Language :: Python :: 3.14",
]
dependencies = [
"opentelemetry-api ~= 1.37",
"opentelemetry-instrumentation ~= 0.58b0",
"opentelemetry-semantic-conventions ~= 0.58b0",
"opentelemetry-api ~= 1.39",
"opentelemetry-instrumentation ~= 0.60b0",
"opentelemetry-semantic-conventions ~= 0.60b0",
"opentelemetry-util-genai >= 0.2b0, <0.4b0",
]

[project.optional-dependencies]
instruments = [
"anthropic >= 0.51.0",
]
instruments = ["anthropic >= 0.51.0"]

[project.entry-points.opentelemetry_instrumentor]
anthropic = "opentelemetry.instrumentation.anthropic:AnthropicInstrumentor"
Expand All @@ -48,15 +46,10 @@ Repository = "https://github.com/open-telemetry/opentelemetry-python-contrib"
path = "src/opentelemetry/instrumentation/anthropic/version.py"

[tool.hatch.build.targets.sdist]
include = [
"/src",
"/tests",
"/examples",
]
include = ["/src", "/tests", "/examples"]

[tool.hatch.build.targets.wheel]
packages = ["src/opentelemetry"]

[tool.pytest.ini_options]
testpaths = ["tests"]

Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ pytest==7.4.4
pytest-vcr==1.0.2
pytest-asyncio==0.21.0
wrapt==1.16.0
opentelemetry-api==1.37 # when updating, also update in pyproject.toml
opentelemetry-sdk==1.37 # when updating, also update in pyproject.toml
opentelemetry-semantic-conventions==0.58b0 # when updating, also update in pyproject.toml
opentelemetry-api==1.39 # when updating, also update in pyproject.toml
opentelemetry-sdk==1.39 # when updating, also update in pyproject.toml
opentelemetry-semantic-conventions==0.60b0 # when updating, also update in pyproject.toml

-e instrumentation-genai/opentelemetry-instrumentation-anthropic
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,14 @@ classifiers = [
"Programming Language :: Python :: 3.13",
]
dependencies = [
"opentelemetry-api ~= 1.37",
"opentelemetry-instrumentation ~= 0.58b0",
"opentelemetry-semantic-conventions ~= 0.58b0",
"opentelemetry-api ~= 1.39",
"opentelemetry-instrumentation ~= 0.60b0",
"opentelemetry-semantic-conventions ~= 0.60b0",
"opentelemetry-util-genai >= 0.2b0, <0.4b0",
]

[project.optional-dependencies]
instruments = [
"claude-agent-sdk >= 0.1.14",
]
instruments = ["claude-agent-sdk >= 0.1.14"]

[project.entry-points.opentelemetry_instrumentor]
claude-agent-sdk = "opentelemetry.instrumentation.claude_agent_sdk:ClaudeAgentSDKInstrumentor"
Expand All @@ -46,11 +44,7 @@ Repository = "https://github.com/open-telemetry/opentelemetry-python-contrib"
path = "src/opentelemetry/instrumentation/claude_agent_sdk/version.py"

[tool.hatch.build.targets.sdist]
include = [
"/src",
"/tests",
"/examples",
]
include = ["/src", "/tests", "/examples"]

[tool.hatch.build.targets.wheel]
packages = ["src/opentelemetry"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ pytest==7.4.4
pytest-vcr==1.0.2
pytest-asyncio==0.21.0
wrapt==1.16.0
opentelemetry-api==1.37 # when updating, also update in pyproject.toml
opentelemetry-sdk==1.37 # when updating, also update in pyproject.toml
opentelemetry-semantic-conventions==0.58b0 # when updating, also update in pyproject.toml
opentelemetry-api==1.39 # when updating, also update in pyproject.toml
opentelemetry-sdk==1.39 # when updating, also update in pyproject.toml
opentelemetry-semantic-conventions==0.60b0 # when updating, also update in pyproject.toml

-e instrumentation-genai/opentelemetry-instrumentation-claude-agent-sdk
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,14 @@ classifiers = [
"Programming Language :: Python :: 3.14",
]
dependencies = [
"opentelemetry-api ~= 1.37",
"opentelemetry-instrumentation ~= 0.58b0",
"opentelemetry-semantic-conventions ~= 0.58b0",
"opentelemetry-api ~= 1.39",
"opentelemetry-instrumentation ~= 0.60b0",
"opentelemetry-semantic-conventions ~= 0.60b0",
"opentelemetry-util-genai",
]

[project.optional-dependencies]
instruments = [
"openai >= 1.26.0",
]
instruments = ["openai >= 1.26.0"]

[project.entry-points.opentelemetry_instrumentor]
openai = "opentelemetry.instrumentation.openai_v2:OpenAIInstrumentor"
Expand All @@ -48,10 +46,7 @@ Repository = "https://github.com/open-telemetry/opentelemetry-python-contrib"
path = "src/opentelemetry/instrumentation/openai_v2/version.py"

[tool.hatch.build.targets.sdist]
include = [
"/src",
"/tests",
]
include = ["/src", "/tests"]

[tool.hatch.build.targets.wheel]
packages = ["src/opentelemetry"]
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ pytest-vcr==1.0.2
pytest-asyncio==0.21.0
wrapt==1.16.0
opentelemetry-exporter-otlp-proto-http~=1.30
opentelemetry-api==1.37 # when updating, also update in pyproject.toml
opentelemetry-sdk==1.37 # when updating, also update in pyproject.toml
opentelemetry-semantic-conventions==0.58b0 # when updating, also update in pyproject.toml
opentelemetry-api==1.39 # when updating, also update in pyproject.toml
opentelemetry-sdk==1.39 # when updating, also update in pyproject.toml
opentelemetry-semantic-conventions==0.60b0 # when updating, also update in pyproject.toml

-e instrumentation-genai/opentelemetry-instrumentation-openai-v2
-e util/opentelemetry-util-genai
6 changes: 4 additions & 2 deletions util/opentelemetry-util-genai/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

- Add EmbeddingInvocation span lifecycle support
([https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4219](#4219))
- Populate schema_url on metrics
([#4320](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4320))
- Add workflow invocation type to genAI utils
Expand Down Expand Up @@ -41,10 +43,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3795](#3795))
- Make inputs / outputs / system instructions optional params to `on_completion`,
([https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3802](#3802)).
- Use a SHA256 hash of the system instructions as it's upload filename, and check
- Use a SHA256 hash of the system instructions as it's upload filename, and check
if the file exists before re-uploading it, ([https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3814](#3814)).


## Version 0.1b0 (2025-09-25)

- Add completion hook to genai utils to implement semconv v1.37.
Expand All @@ -57,6 +58,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#3752](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3752))
([#3759](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3759))
([#3763](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3763))

- Add a utility to parse the `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT` environment variable.
Add `gen_ai_latest_experimental` as a new value to the Sem Conv stability flag ([#3716](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3716)).

Expand Down
12 changes: 12 additions & 0 deletions util/opentelemetry-util-genai/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ This package provides these span attributes:
- `gen_ai.output.messages`: Str('[{"role": "AI", "parts": [{"content": "hello back", "type": "text"}], "finish_reason": "stop"}]')
- `gen_ai.system_instructions`: Str('[{"content": "You are a helpful assistant.", "type": "text"}]') (when system instruction is provided)

This package also supports embedding invocation spans via the `embedding` context manager.
For embedding invocations, common attributes include:

- `gen_ai.provider.name`: Str(openai)
- `gen_ai.operation.name`: Str(embeddings)
- `gen_ai.request.model`: Str(text-embedding-3-small)
- `gen_ai.embeddings.dimension.count`: Int(1536)
- `gen_ai.request.encoding_formats`: Slice(["float"])
- `gen_ai.usage.input_tokens`: Int(24)
- `server.address`: Str(api.openai.com)
- `server.port`: Int(443)

When `EVENT_ONLY` or `SPAN_AND_EVENT` mode is enabled and a LoggerProvider is configured,
the package also emits `gen_ai.client.inference.operation.details` events with structured
message content (as dictionaries instead of JSON strings). Note that when using `EVENT_ONLY`
Expand Down
11 changes: 4 additions & 7 deletions util/opentelemetry-util-genai/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ classifiers = [
"Programming Language :: Python :: 3.14",
]
dependencies = [
"opentelemetry-instrumentation ~= 0.58b0",
"opentelemetry-semantic-conventions ~= 0.58b0",
"opentelemetry-api>=1.31.0",
"opentelemetry-instrumentation ~= 0.60b0",
"opentelemetry-semantic-conventions ~= 0.60b0",
"opentelemetry-api>=1.39",
]

[project.entry-points.opentelemetry_genai_completion_hook]
Expand All @@ -46,10 +46,7 @@ Repository = "https://github.com/open-telemetry/opentelemetry-python-contrib"
path = "src/opentelemetry/util/genai/version.py"

[tool.hatch.build.targets.sdist]
include = [
"/src",
"/tests",
]
include = ["/src", "/tests"]

[tool.hatch.build.targets.wheel]
packages = ["src/opentelemetry"]
Loading
Loading