Commit Graph

127 Commits

Author SHA1 Message Date
otelbot[bot]
f9b8d5a807 Update version to 1.39.0.dev/0.60b0.dev (#3863)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
2025-10-16 10:59:48 +02:00
otelbot[bot]
21a35b60de Update opentelemetry-util-genai version to v0.3b0 (#3844)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: Aaron Abbott <aaronabbott@google.com>
2025-10-15 19:51:03 +00:00
DylanRussell
ebe5bdf465 Use an sha 256 hash of the system instructions as it's upload filename (#3814)
* Use md5 hash of system instructions as the filename for system instructions.

* Fix typecheck add changelog

* Respond to comments

* Merge to main and fix changelog

* Switch to Sha 256

* Make changes

* Fix hashing

* Fix lint, typecheck, broke test

* Respond to comments

* fix test

* Fix linter

* Fix assert statements and update changelog
2025-10-14 16:51:47 -04:00
Keith Decker
e3d3817424 GenAI Utils | Inference Type and Span Creation (#3768)
* cherry pick changes from previous PR

* move span utils to new file

* remove span state, use otel context for parent/child

* flatten LLMInvocation to use attributes instead of dict keys

* helper function and docstrings

* refactor: store span and context token in LLMInvocation instead of SpanGenerator

* refactor: rename prompts/chat_generations to input_messages/output_messages for clarity

* refactor: simplify TelemetryHandler API by moving invocation data management to LLMInvocation class

* refactor: update relative imports to absolute imports

* Update handler to use a context manager instead of start_llm and stop_llm

* resolve tox -e doc failure

* safeguard against empty request-model

* fix tox typecheck errors for utils

* refactor: move tracer to generator, clean up dead code

* remove unused linting hint

* back off stricter request-model requirements

* reintroduce manual start/stop for langchain callback flow

* clean up context handler, clarify unit tests

* remove generator concept

* update token types

* code cleanup

* Refactor TestTelemetryHandler to use instance method for span exporter setup

* refactor: remove unused type properties

* refactor: update TelemetryHandler initialization to remove **kwargs

* refactor: remove tracer variable

* refactor: code style updates

* refactor: replace json.dumps with gen_ai_json_dumps for message serialization

* refactor: update span lifecycle to use sdk over setting context manually

* refactor: don't reinvent span attribute assignment

* refactor: pylint update for python 3.13

* Revert "refactor: update span lifecycle to use sdk over setting context manually"

This reverts commit be8620bb33.

---------

Co-authored-by: Aaron Abbott <aaronabbott@google.com>
2025-10-10 17:11:58 -04:00
DylanRussell
a4adc93c8e Update google-genai instrumentation to use Logs API instead of the deprecated events API (#3625)
* initial commit removing events from genai stuff

* Fix function that finds events

* Update changelog

* Require opentelemetry-api 1.35.0

* Change logger_provider var name to be logger

* Fix version requirmenets

* Fix changelog

* Upgrade dependencies..

* use opentelemetry api 1.37 not .37.0

* Update CHANGELOG.md

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>

* Update CHANGELOG

* Fix broken test

* Fix changelog

* Respond to comments

---------

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Aaron Abbott <aaronabbott@google.com>
2025-10-08 04:36:52 +00:00
DylanRussell
28eed8faa6 Update vertexai instrumentation to be in-line with the latest semantic conventions part 2 (#3799)
* More changes

* Update instrumentation to emit spans in the new format, call the upload hook

* Update example and changelog

* Fix linter
2025-10-03 12:41:18 -04:00
DylanRussell
dec86001ca Update completion upload hook to make input / output / system instructions optional (#3802)
* Make refs optional

* Add changelog entry
2025-10-02 16:08:34 +00:00
otelbot[bot]
512868321d Copy changelog updates from package-release/opentelemetry-util-genai/v0.1bx (#3790)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-10-01 11:55:23 +00:00
Aaron Abbott
02cbe28353 Record content-type and use canonical paths in fsspec genai uploader (#3795) 2025-10-01 04:50:21 +00:00
Aaron Abbott
229d969a34 Rename "fsspec_upload" entry point and classes to more generic "upload" (#3798) 2025-09-30 20:46:12 +00:00
Aaron Abbott
205fd59bd1 Add jsonlines support to fsspec uploader (#3791)
* Add jsonlines support to fsspec uploader

* review comments
2025-09-30 00:01:07 -04:00
otelbot[bot]
b0679f1dd6 Update opentelemetry-util-genai version to v0.2b0 (#3783)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: Aaron Abbott <aaronabbott@google.com>
2025-09-25 20:42:59 +00:00
Aaron Abbott
cf00cf57b6 Rename UploadHook -> CompletionHook (#3780) 2025-09-24 15:29:39 -04:00
Aaron Abbott
13fa314cc6 gen ai uploader timeout and fix flaky bugs (#3770) 2025-09-19 19:17:31 +00:00
Aaron Abbott
9fab62bcea gen ai uploader encode bytes as base64 (#3771) 2025-09-19 12:10:39 -04:00
Aaron Abbott
4fb00c9894 Stamp uploaded references refs onto spans and logs (#3763)
* Stamp gen ai refs on spans and logs

* remove log body stamping

* fix lint
2025-09-18 20:07:33 +00:00
Aaron Abbott
ee947cec0c Fix the changelog from #3716 (#3764)
See https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3716,
the changelog entry should have been in the sub-package specific one.
2025-09-17 20:48:37 +00:00
Aaron Abbott
7819be1850 Add fsspec gen ai upload hook (#3759)
* Add fsspec gen ai upload hook

* split up into sub-package to make imports cleaner

* Get rid of FsspecUploader separate class

* comments, clean up doc strings
2025-09-17 13:44:44 -04:00
Aaron Abbott
7eb92032b2 Define genai content uploader hook and entry point (#3752)
* Get genai utils sphinx docs building

* Add genai types and utils for loading an uploader hook
2025-09-15 15:56:21 -04:00
otelbot[bot]
843f345348 Update version to 1.38.0.dev/0.59b0.dev (#3746)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-09-11 12:00:58 +00:00
Riccardo Magliocchetti
2d46564015 Exclude opentelemetry-util-genai from release upload (#3747)
Because it should be released on its own.
While at it fix its README.rst formatting.
2025-09-11 13:35:07 +02:00
DylanRussell
2ecc2d2404 Add gen_ai_latest_experimental to the Sem Conv stability flag. Add ContentCapturingMode enum (#3716)
* initial commit

* lint

* Fix tests

* Fix typecheck

* Update opentelemetry-instrumentation/src/opentelemetry/instrumentation/_semconv.py

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>

* Update util/opentelemetry-util-genai/src/opentelemetry/util/genai/utils.py

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>

* Use ValueError

* Rename enum

* Update util/opentelemetry-util-genai/tests/test_utils.py

Co-authored-by: Aaron Abbott <aaronabbott@google.com>

* Update util/opentelemetry-util-genai/tests/test_utils.py

Co-authored-by: Aaron Abbott <aaronabbott@google.com>

* Update util/opentelemetry-util-genai/tests/test_utils.py

Co-authored-by: Aaron Abbott <aaronabbott@google.com>

* Update util/opentelemetry-util-genai/tests/test_utils.py

Co-authored-by: Aaron Abbott <aaronabbott@google.com>

* Default env var to NO_CONTENT when invalid envvar

* Address comments

* Address comment

* Fix typecheck

* don't change typecheck,

* Fix linter

* Address comments

* Fix order of args..

---------

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Co-authored-by: Aaron Abbott <aaronabbott@google.com>
2025-09-04 18:10:05 -04:00
DylanRussell
b1b9505043 Add shared Dataclass Types for GenAi instrumentations (#3718)
* Add GenAI Types

* ADd defaults

---------

Co-authored-by: Aaron Abbott <aaronabbott@google.com>
2025-09-04 20:42:20 +00:00
Andre Murbach Maidl
f11f03ce6e Avoid calls to context.detach with None token (#3673)
* fixes open-telemetry/opentelemetry-python-contrib#3351

* Add changelog entry about open-telemetry/opentelemetry-python-contrib#3673

---------

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-08-18 12:39:16 +00:00
Keith Decker
bbcdf8b737 GenAI Utils Structure (#3672)
* GenAI SDK Structure

* generate bootstrap entry

* Rename GenAI SDK to GenAI Utils

* remove duplicate dependency

* update uv lock

* generate tox doc

* remove sdk dependency, remove bootstrap entry

* ran tox generate and uv sync

* move package out of instrumentation folder

* remove package file

* rename package to align with other util package

* add tox boilerplate

* tox boilerplate

* Fix pytest version

* Corrected RST Link
2025-08-14 22:33:26 -04:00
otelbot[bot]
76509d7053 Update version to 1.37.0.dev/0.58b0.dev (#3658) 2025-07-29 07:50:20 -08:00
OpenTelemetry Bot
109173fec7 Update version to 1.36.0.dev/0.57b0.dev (#3633) 2025-07-11 14:35:47 +02:00
rads-1996
b69ebb7224 Redact specific url query string values and url credentials in instrumentations (#3508)
* Updated the instrumentation with aiohttp-server tests for url redaction

* Updated the aiohttp-server implementation and the query redaction logic

* Updated changelog and moved change to unreleased. Updated test files with license header

* Improved formatting

* Fixed failing tests

* Fixed ruff

* Update util/opentelemetry-util-http/src/opentelemetry/util/http/__init__.py

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>

---------

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
2025-07-01 12:26:47 +00:00
Ezzio Moreira
ca079cbc56 feat: change semcov util/opentelemetry-util-http (#3592) 2025-06-30 08:21:28 +00:00
OpenTelemetry Bot
59cc34e9f3 Update version to 1.35.0.dev/0.56b0.dev (#3556) 2025-06-04 16:53:03 +02:00
Joe McGinley
a164d37a3c Chore: Drop support for Python 3.8 (#3399)
Python 3.8 was EoL @ 2024-10-07, our 6 month promise for support ended on 2024-04-07.

Changes:
* Updated basline refs to 3.9
* Removed 3.8 sys.version_info checks
* Fixed botocore test failure
* Applied ruff formatting
2025-05-27 17:26:02 +02:00
OpenTelemetry Bot
4a1e0ce941 Update version to 1.34.0.dev/0.55b0.dev (#3484) 2025-05-09 17:10:08 +02:00
OpenTelemetry Bot
6587485d05 Update version to 1.33.0.dev/0.54b0.dev (#3413)
* Update version to 1.33.0.dev/0.54b0.dev

* Point CORE_REPO_SHA to opentelemetrybot/update-version-to-1.33.0.dev-0.54b0.dev

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-04-10 13:53:58 +00:00
OpenTelemetry Bot
6189be647c Update version to 1.32.0.dev/0.53b0.dev (#3359) 2025-03-12 12:07:49 -08:00
OpenTelemetry Bot
85e21a9e22 Update version to 1.31.0.dev/0.52b0.dev (#3233) 2025-02-04 12:55:11 -08:00
Marcelo Trylesinski
5219242eaf Support PEP 561 to opentelemetry-instrumentation-wsgi (#3129) 2025-01-13 13:32:16 -08:00
Marcelo Trylesinski
9af3136e7f Support PEP 561 to opentelemetry-util-http (#3127) 2025-01-09 13:21:19 -08:00
Emídio Neto
54882871b9 add official support to Python 3.13 (#3134)
* add py313 to tox

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix wrong identation troveclassifiers

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix pyramid, django

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix httpx

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix httpx, grpc and add vertex

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* generate-workflows

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix generate-workflows

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* fix celery and psycopg

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* add changelog

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* Update CHANGELOG.md

* Update tox.ini

---------

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2024-12-31 16:08:20 +00:00
Andrea Galbusera
54cbf59aae Update package metadata adding "Repository" to project urls (#3119)
Add "Repository" label to project urls pointing to the
opentelemetry-python repo root url.

Having within project urls one entry with the same value for all
packages released by the project will help tools for automatic
dependency management to suggest coherent upgrades for related packages.
2024-12-19 10:15:58 +00:00
OpenTelemetry Bot
490580d6f3 Update version to 1.30.0.dev/0.51b0.dev (#3092) 2024-12-12 11:17:53 +00:00
OpenTelemetry Bot
226258e457 Update version to 1.29.0.dev/0.50b0.dev (#2954) 2024-11-05 14:22:03 -08:00
Riccardo Magliocchetti
e4ece57a81 Remove pkg resources (#2871) 2024-10-19 06:49:08 -07:00
Anton Pirker
f8bb28928c Update test requirements for work with Python 3.13 (#2887)
* Added deb to make cassandra tests work with python 3.13

* Bumped cffi to work with Python 3.13

* Fixed some test-requirements for Python 3.13

* Updated typing_extensions everywhere

---------

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
2024-09-26 08:52:02 +02:00
Emídio Neto
40c3363e9d bump asgiref to 3.8.1 in test-requirements (#2841)
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2024-09-03 13:28:53 -06:00
OpenTelemetry Bot
ee67ea8ba5 Update version to 1.28.0.dev/0.49b0.dev (#2828)
* Update version to 1.28.0.dev/0.49b0.dev

* Update core SHA

---------

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2024-08-28 15:20:37 -06:00
OpenTelemetry Bot
68b20f96c5 Update version to 1.27.0.dev/0.48b0.dev (#2728)
* Update version to 1.27.0.dev/0.48b0.dev

* Update SHA and fix test cases

* Update SHA

---------

Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
2024-07-24 21:18:49 -06:00
Gustavo Carvalho
15f3b97d5a Improved Test Coverage for HTTP Utility's IP Setting Functionality (#2693) 2024-07-12 15:44:44 -07:00
Diego Hurtado
75faaad986 Remove unnecessary dependencies (#2663)
* Remove unnecessary dependencies

Fixes #2661

* Separate runs

* Remove dev-requirements from test environment

* Try without negative if

* Remove positive if

* Remove if

* Separate benchmark-containing packages in another file

* Add missing test-requirements.txt file
2024-07-04 16:04:53 -06:00
Emídio Neto
a3e457ca8c add opentelemetry-util-http to CI (#2655) 2024-07-03 11:00:27 -07:00
Emídio Neto
f531996f53 fix util-http package (#2634) 2024-06-26 09:34:04 -07:00