Skip to content

Commit ae456be

Browse files
authored
Merge branch 'main' into docs/issue-3038
2 parents 47c2589 + b6541f0 commit ae456be

File tree

32 files changed

+654
-58
lines changed

32 files changed

+654
-58
lines changed

.github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ jobs:
5151
run: git checkout ${% raw %}{{ github.event.pull_request.head.sha }}{% endraw %}
5252
{%- endif %}
5353

54-
- name: Set up Python 3.10
54+
- name: Set up Python 3.11
5555
uses: actions/setup-python@v5
5656
with:
57-
python-version: "3.10"
57+
python-version: "3.11"
5858

5959
- name: Install tox
6060
run: pip install tox

.github/workflows/misc_0.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
- name: Checkout repo @ SHA - ${{ github.sha }}
2424
uses: actions/checkout@v4
2525

26-
- name: Set up Python 3.10
26+
- name: Set up Python 3.11
2727
uses: actions/setup-python@v5
2828
with:
29-
python-version: "3.10"
29+
python-version: "3.11"
3030

3131
- name: Install tox
3232
run: pip install tox
@@ -41,10 +41,10 @@ jobs:
4141
- name: Checkout repo @ SHA - ${{ github.sha }}
4242
uses: actions/checkout@v4
4343

44-
- name: Set up Python 3.10
44+
- name: Set up Python 3.11
4545
uses: actions/setup-python@v5
4646
with:
47-
python-version: "3.10"
47+
python-version: "3.11"
4848

4949
- name: Install tox
5050
run: pip install tox
@@ -61,10 +61,10 @@ jobs:
6161
- name: Checkout repo @ SHA - ${{ github.sha }}
6262
uses: actions/checkout@v4
6363

64-
- name: Set up Python 3.10
64+
- name: Set up Python 3.11
6565
uses: actions/setup-python@v5
6666
with:
67-
python-version: "3.10"
67+
python-version: "3.11"
6868

6969
- name: Install tox
7070
run: pip install tox
@@ -79,10 +79,10 @@ jobs:
7979
- name: Checkout repo @ SHA - ${{ github.sha }}
8080
uses: actions/checkout@v4
8181

82-
- name: Set up Python 3.10
82+
- name: Set up Python 3.11
8383
uses: actions/setup-python@v5
8484
with:
85-
python-version: "3.10"
85+
python-version: "3.11"
8686

8787
- name: Install tox
8888
run: pip install tox
@@ -103,10 +103,10 @@ jobs:
103103
- name: Checkout repo @ SHA - ${{ github.sha }}
104104
uses: actions/checkout@v4
105105

106-
- name: Set up Python 3.10
106+
- name: Set up Python 3.11
107107
uses: actions/setup-python@v5
108108
with:
109-
python-version: "3.10"
109+
python-version: "3.11"
110110

111111
- name: Install tox
112112
run: pip install tox
@@ -124,10 +124,10 @@ jobs:
124124
- name: Checkout repo @ SHA - ${{ github.sha }}
125125
uses: actions/checkout@v4
126126

127-
- name: Set up Python 3.10
127+
- name: Set up Python 3.11
128128
uses: actions/setup-python@v5
129129
with:
130-
python-version: "3.10"
130+
python-version: "3.11"
131131

132132
- name: Install tox
133133
run: pip install tox
@@ -142,10 +142,10 @@ jobs:
142142
- name: Checkout repo @ SHA - ${{ github.sha }}
143143
uses: actions/checkout@v4
144144

145-
- name: Set up Python 3.10
145+
- name: Set up Python 3.11
146146
uses: actions/setup-python@v5
147147
with:
148-
python-version: "3.10"
148+
python-version: "3.11"
149149

150150
- name: Install tox
151151
run: pip install tox

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Added
1515

16+
- `opentelemetry-instrumentation-starlette` Add type hints to the instrumentation
17+
([#3045](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3045))
1618
- `opentelemetry-distro` default to OTLP log exporter.
1719
([#3042](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3042))
1820
- `opentelemetry-instrumentation-sqlalchemy` Update unit tests to run with SQLALchemy 2
@@ -44,6 +46,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4446
([#3022](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3022))
4547
- Replace all instrumentor unit test `assertEqualSpanInstrumentationInfo` calls with `assertEqualSpanInstrumentationScope` calls
4648
([#3037](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3037))
49+
- `opentelemetry-instrumentation-sqlalchemy`: Fix a remaining memory leak in EngineTracer
50+
([#3053](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3053))
4751

4852
### Breaking changes
4953

docs-requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ elasticsearch>=6.0,<9.0
2525
flask~=2.0
2626
falcon~=2.0
2727
grpcio~=1.27
28+
httpx>=0.18.0
2829
kafka-python>=2.0,<3.0
2930
mysql-connector-python~=8.0
3031
mysqlclient~=2.1.1
32+
openai >= 1.26.0
3133
psutil>=5
3234
psycopg~=3.1.17
3335
pika>=0.12.0
@@ -39,7 +41,6 @@ remoulade>=0.50
3941
sqlalchemy>=1.0
4042
tornado>=5.1.1
4143
tortoise-orm>=0.17.0
42-
httpx>=0.18.0
4344

4445
# indirect dependency pins
4546
markupsafe==2.0.1

docs/conf.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@
4040
if isdir(join(instr, f))
4141
]
4242

43+
instr_genai = "../instrumentation-genai"
44+
instr_genai_dirs = [
45+
os.path.abspath("/".join(["../instrumentation-genai", f, "src"]))
46+
for f in listdir(instr_genai)
47+
if isdir(join(instr_genai, f))
48+
]
49+
4350
prop = "../propagator"
4451
prop_dirs = [
4552
os.path.abspath("/".join([prop, f, "src"]))
@@ -60,7 +67,14 @@
6067
for f in listdir(resource)
6168
if isdir(join(resource, f))
6269
]
63-
sys.path[:0] = exp_dirs + instr_dirs + sdk_ext_dirs + prop_dirs + resource_dirs
70+
sys.path[:0] = (
71+
exp_dirs
72+
+ instr_dirs
73+
+ instr_genai_dirs
74+
+ sdk_ext_dirs
75+
+ prop_dirs
76+
+ resource_dirs
77+
)
6478

6579
# -- Project information -----------------------------------------------------
6680

docs/index.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ installed separately via pip:
2424
pip install opentelemetry-instrumentation-{instrumentation}
2525
pip install opentelemetry-sdk-extension-{sdk-extension}
2626
27-
A complete list of packages can be found at the
27+
A complete list of packages can be found at the
2828
`Contrib repo instrumentation <https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation>`_
2929
and `Contrib repo exporter <https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/exporter>`_ directories.
3030

@@ -50,6 +50,7 @@ install <https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs>
5050
cd opentelemetry-python-contrib
5151
pip install -e ./instrumentation/opentelemetry-instrumentation-flask
5252
pip install -e ./instrumentation/opentelemetry-instrumentation-botocore
53+
pip install -e ./instrumentation-genai/opentelemetry-instrumentation-openai-v2
5354
pip install -e ./sdk-extension/opentelemetry-sdk-extension-aws
5455
pip install -e ./resource/opentelemetry-resource-detector-container
5556
@@ -62,6 +63,14 @@ install <https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs>
6263

6364
instrumentation/**
6465

66+
.. toctree::
67+
:maxdepth: 2
68+
:caption: OpenTelemetry Generative AI Instrumentations
69+
:name: Generative AI Instrumentations
70+
:glob:
71+
72+
instrumentation-genai/**
73+
6574
.. toctree::
6675
:maxdepth: 2
6776
:caption: OpenTelemetry Propagators
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
OpenTelemetry Python - OpenAI Instrumentation
2+
=============================================
3+
4+
.. automodule:: opentelemetry.instrumentation.openai_v2
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. include:: ../../../instrumentation/opentelemetry-instrumentation-aiohttp-server/README.rst
2+
:end-before: References
3+
4+
.. automodule:: opentelemetry.instrumentation.aiohttp_server
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. include:: ../../../instrumentation/opentelemetry-instrumentation-click/README.rst
2+
:end-before: References
3+
4+
.. automodule:: opentelemetry.instrumentation.click
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs/nitpick-exceptions.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ py-class=
2424
httpx.Client
2525
httpx.AsyncClient
2626
httpx.BaseTransport
27+
openai.BaseTransport
2728
httpx.AsyncBaseTransport
2829
httpx.SyncByteStream
2930
httpx.AsyncByteStream
3031
httpx.Response
32+
aiohttp.web_request.Request
3133
yarl.URL
3234
cimpl.Producer
3335
cimpl.Consumer
@@ -64,7 +66,7 @@ any=
6466

6567
py-obj=
6668
opentelemetry.propagators.textmap.CarrierT
67-
69+
6870
py-func=
6971
poll
7072
flush

0 commit comments

Comments
 (0)