Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
b72b4cd
Begin instrumentation of GenAI SDK.
michaelsafyan Feb 7, 2025
74a648a
Merge branch 'open-telemetry:main' into genaisdk_instrumentation
michaelsafyan Feb 10, 2025
a850642
Snapshot current state.
michaelsafyan Feb 10, 2025
257da64
Created minimal tests and got first test to pass.
michaelsafyan Feb 10, 2025
3244258
Added test for span attributes.
michaelsafyan Feb 10, 2025
431fdf5
Ensure that token counts work.
michaelsafyan Feb 10, 2025
b6068e2
Add more tests.
michaelsafyan Feb 10, 2025
5ac2108
Make it easy to turn off instrumentation for streaming and async to a…
michaelsafyan Feb 10, 2025
f503787
Merge branch 'open-telemetry:main' into genaisdk_instrumentation
michaelsafyan Feb 11, 2025
7fcbd8c
Add licenses and fill out main README.rst.
michaelsafyan Feb 11, 2025
6ecd69c
Add a changelog file.
michaelsafyan Feb 11, 2025
5bcb73a
Fill out 'requirements.txt' and 'README.rst' for the manual instrumen…
michaelsafyan Feb 11, 2025
65241b0
Add missing exporter dependency for the manual instrumentation example.
michaelsafyan Feb 11, 2025
44f5081
Fill out rest of the zero-code example.
michaelsafyan Feb 11, 2025
5e5f226
Add minimal tests for async, streaming cases.
michaelsafyan Feb 11, 2025
7b3805c
Update sync test to use indirection on top of 'client.models.generate…
michaelsafyan Feb 11, 2025
3ee8dd1
Fix ruff check issues.
michaelsafyan Feb 11, 2025
6b66fe4
Add subproject to top-level project build mechanism.
michaelsafyan Feb 11, 2025
06ab153
Simplify invocation of pylint.
michaelsafyan Feb 12, 2025
9f73c64
Fix 'make test' command and lint issues.
michaelsafyan Feb 12, 2025
319f0a5
Add '.dev' suffix to version per feedback on pull request #3256
michaelsafyan Feb 12, 2025
493689e
Fix README.rst files for the examples.
michaelsafyan Feb 12, 2025
368a3cc
Add specific versions for the examples.
michaelsafyan Feb 12, 2025
4682521
Merge branch 'main' into genaisdk_instrumentation
michaelsafyan Feb 12, 2025
e2afc4e
Merge branch 'open-telemetry:main' into genaisdk_instrumentation
michaelsafyan Feb 12, 2025
a157e2e
Revamp 'make test' to not require local 'tox.ini' configuration.
michaelsafyan Feb 12, 2025
dd606c2
Extend separators per review comment.
michaelsafyan Feb 12, 2025
a2ec3fb
Fix version conflict caused by non-hermetic requirements.
michaelsafyan Feb 12, 2025
1304fed
Fix typo on the comment line.
michaelsafyan Feb 12, 2025
07cbf2f
Merge branch 'open-telemetry:main' into genaisdk_instrumentation
michaelsafyan Feb 13, 2025
159418e
Add test for the use of the 'vertex_ai' system, and improve how this …
michaelsafyan Feb 13, 2025
bf98bba
Factor out testing logic to enable sharing with the async code.
michaelsafyan Feb 13, 2025
e4386ad
Addressed minor lint issues.
michaelsafyan Feb 13, 2025
e6420b2
Make it clearer that nonstreaming_base is a helper module that is not…
michaelsafyan Feb 13, 2025
86a6f0e
Merge branch 'open-telemetry:main' into genaisdk_instrumentation
michaelsafyan Feb 14, 2025
23fe105
Merge branch 'open-telemetry:main' into genaisdk_instrumentation
michaelsafyan Feb 18, 2025
97494b5
Integrate feedback from related pull request #3268.
michaelsafyan Feb 18, 2025
c006346
Update workflows with 'tox -e generate-workflows'.
michaelsafyan Feb 18, 2025
038f90e
Improve data model and add some rudimentary type checking.
michaelsafyan Feb 18, 2025
7647992
Accept only 'true' for a true value to align with other code.
michaelsafyan Feb 18, 2025
e678135
Merge branch 'main' into genaisdk_instrumentation
michaelsafyan Feb 19, 2025
c834e97
Update the scope name used.
michaelsafyan Feb 19, 2025
6ae0525
Add **kwargs to patched methods to prevent future breakage due to the…
michaelsafyan Feb 19, 2025
1a8cad9
Remove redundant list conversion in call to "sorted".
michaelsafyan Feb 19, 2025
00d2d9f
Reformat with 'tox -e ruff'.
michaelsafyan Feb 19, 2025
f0ca9ae
Fix failing lint workflow.
michaelsafyan Feb 19, 2025
016596e
Fix failing lint workflow.
michaelsafyan Feb 19, 2025
19c2627
Exclude Google GenAI instrumentation from the bootstrap code for now.
michaelsafyan Feb 19, 2025
d2a42bd
Minor improvements to the tooling shell files.
michaelsafyan Feb 19, 2025
ab36068
Fix typo flagged by codespell spellchecker.
michaelsafyan Feb 19, 2025
117c811
Increase alignment with broader repo practices.
michaelsafyan Feb 20, 2025
a761858
Add more TODOs and documentation to clarify the intended work scope.
michaelsafyan Feb 20, 2025
94ee68b
Remove unneeded accessor from OTelWrapper.
michaelsafyan Feb 20, 2025
fe5a19c
Add more comments to the tests.
michaelsafyan Feb 20, 2025
3fc667e
Reformat with ruff.
michaelsafyan Feb 20, 2025
f240b85
Change 'desireable' to 'desirable' per codespell spellchecker.
michaelsafyan Feb 20, 2025
b263ae7
Make tests pass without pythonpath
aabmass Feb 20, 2025
567adc6
Fix new lint errors showing up after change
aabmass Feb 20, 2025
62c4963
Revert "Fix new lint errors showing up after change"
aabmass Feb 20, 2025
918341f
Merge pull request #1 from aabmass/genaisdk_instrumentation-pythonpat…
michaelsafyan Feb 20, 2025
82c832b
Add TODO item required/requested from code review.
michaelsafyan Feb 21, 2025
a8e8739
Resolve merge conflict.
michaelsafyan Feb 21, 2025
25aa401
Simplify changelog per PR feedback.
michaelsafyan Feb 21, 2025
4adef35
Remove square brackets from model name in span name per PR feedback.
michaelsafyan Feb 21, 2025
08c84bb
Merge branch 'main' into genaisdk_instrumentation
michaelsafyan Feb 21, 2025
654c0d9
Merge branch 'main' into genaisdk_instrumentation
michaelsafyan Feb 24, 2025
e654b89
Merge branch 'open-telemetry:main' into genaisdk_instrumentation
michaelsafyan Feb 24, 2025
1a01b79
Misc test cleanup. Now that scripts are invoked solely through pytest…
michaelsafyan Feb 25, 2025
194f0b0
Improve quality of event logging.
michaelsafyan Feb 25, 2025
f40ecc5
Update operation name to use a constant for consistency.
michaelsafyan Feb 25, 2025
21f430f
Reformat with ruff.
michaelsafyan Feb 25, 2025
c944b9c
Exclude opentelemetry-instrumentation-google-genai from root uv works…
aabmass Feb 26, 2025
8d6c90e
Merge branch 'open-telemetry:main' into genaisdk_instrumentation
michaelsafyan Feb 26, 2025
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
18 changes: 18 additions & 0 deletions .github/workflows/lint_0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,24 @@ jobs:
- name: Run tests
run: tox -e lint-instrumentation-vertexai

lint-instrumentation-google-genai:
name: instrumentation-google-genai
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e lint-instrumentation-google-genai

lint-resource-detector-container:
name: resource-detector-container
runs-on: ubuntu-latest
Expand Down
360 changes: 180 additions & 180 deletions .github/workflows/test_0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,186 @@ jobs:
- name: Run tests
run: tox -e py313-test-instrumentation-vertexai-latest -- -ra

py39-test-instrumentation-google-genai-oldest_ubuntu-latest:
name: instrumentation-google-genai-oldest 3.9 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: "3.9"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py39-test-instrumentation-google-genai-oldest -- -ra

py39-test-instrumentation-google-genai-latest_ubuntu-latest:
name: instrumentation-google-genai-latest 3.9 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: "3.9"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py39-test-instrumentation-google-genai-latest -- -ra

py310-test-instrumentation-google-genai-oldest_ubuntu-latest:
name: instrumentation-google-genai-oldest 3.10 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py310-test-instrumentation-google-genai-oldest -- -ra

py310-test-instrumentation-google-genai-latest_ubuntu-latest:
name: instrumentation-google-genai-latest 3.10 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py310-test-instrumentation-google-genai-latest -- -ra

py311-test-instrumentation-google-genai-oldest_ubuntu-latest:
name: instrumentation-google-genai-oldest 3.11 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py311-test-instrumentation-google-genai-oldest -- -ra

py311-test-instrumentation-google-genai-latest_ubuntu-latest:
name: instrumentation-google-genai-latest 3.11 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py311-test-instrumentation-google-genai-latest -- -ra

py312-test-instrumentation-google-genai-oldest_ubuntu-latest:
name: instrumentation-google-genai-oldest 3.12 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py312-test-instrumentation-google-genai-oldest -- -ra

py312-test-instrumentation-google-genai-latest_ubuntu-latest:
name: instrumentation-google-genai-latest 3.12 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py312-test-instrumentation-google-genai-latest -- -ra

py313-test-instrumentation-google-genai-oldest_ubuntu-latest:
name: instrumentation-google-genai-oldest 3.13 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py313-test-instrumentation-google-genai-oldest -- -ra

py313-test-instrumentation-google-genai-latest_ubuntu-latest:
name: instrumentation-google-genai-latest 3.13 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py313-test-instrumentation-google-genai-latest -- -ra

py38-test-resource-detector-container_ubuntu-latest:
name: resource-detector-container 3.8 Ubuntu
runs-on: ubuntu-latest
Expand Down Expand Up @@ -4335,183 +4515,3 @@ jobs:

- name: Run tests
run: tox -e py310-test-instrumentation-urllib3-0 -- -ra

py310-test-instrumentation-urllib3-1_ubuntu-latest:
name: instrumentation-urllib3-1 3.10 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py310-test-instrumentation-urllib3-1 -- -ra

py311-test-instrumentation-urllib3-0_ubuntu-latest:
name: instrumentation-urllib3-0 3.11 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py311-test-instrumentation-urllib3-0 -- -ra

py311-test-instrumentation-urllib3-1_ubuntu-latest:
name: instrumentation-urllib3-1 3.11 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py311-test-instrumentation-urllib3-1 -- -ra

py312-test-instrumentation-urllib3-0_ubuntu-latest:
name: instrumentation-urllib3-0 3.12 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py312-test-instrumentation-urllib3-0 -- -ra

py312-test-instrumentation-urllib3-1_ubuntu-latest:
name: instrumentation-urllib3-1 3.12 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py312-test-instrumentation-urllib3-1 -- -ra

py313-test-instrumentation-urllib3-0_ubuntu-latest:
name: instrumentation-urllib3-0 3.13 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py313-test-instrumentation-urllib3-0 -- -ra

py313-test-instrumentation-urllib3-1_ubuntu-latest:
name: instrumentation-urllib3-1 3.13 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py313-test-instrumentation-urllib3-1 -- -ra

pypy3-test-instrumentation-urllib3-0_ubuntu-latest:
name: instrumentation-urllib3-0 pypy-3.8 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python pypy-3.8
uses: actions/setup-python@v5
with:
python-version: "pypy-3.8"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e pypy3-test-instrumentation-urllib3-0 -- -ra

pypy3-test-instrumentation-urllib3-1_ubuntu-latest:
name: instrumentation-urllib3-1 pypy-3.8 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python pypy-3.8
uses: actions/setup-python@v5
with:
python-version: "pypy-3.8"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e pypy3-test-instrumentation-urllib3-1 -- -ra

py38-test-instrumentation-requests_ubuntu-latest:
name: instrumentation-requests 3.8 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: "3.8"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py38-test-instrumentation-requests -- -ra
Loading