mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-08-03 04:10:48 +08:00
OpenAI instrumentation docs fixes (#2988)
* Add openai docs config and improve readme * up * Add manual sample, add no-content tests * update headers * lint * use grpc endpoint in openai samples, add extra env vars to readme * move distro fix to another PR * nits * Ignore examples for pylint * Update .pylintrc * ignroe lint for example * Fix README docs * Update openai.rst * Update conf.py * Update docs-requirements.txt * docs --------- Co-authored-by: Leighton Chen <lechen@microsoft.com> Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
This commit is contained in:
16
docs/conf.py
16
docs/conf.py
@ -40,6 +40,13 @@ instr_dirs = [
|
||||
if isdir(join(instr, f))
|
||||
]
|
||||
|
||||
instr_genai = "../instrumentation-genai"
|
||||
instr_genai_dirs = [
|
||||
os.path.abspath("/".join(["../instrumentation-genai", f, "src"]))
|
||||
for f in listdir(instr_genai)
|
||||
if isdir(join(instr_genai, f))
|
||||
]
|
||||
|
||||
prop = "../propagator"
|
||||
prop_dirs = [
|
||||
os.path.abspath("/".join([prop, f, "src"]))
|
||||
@ -60,7 +67,14 @@ resource_dirs = [
|
||||
for f in listdir(resource)
|
||||
if isdir(join(resource, f))
|
||||
]
|
||||
sys.path[:0] = exp_dirs + instr_dirs + sdk_ext_dirs + prop_dirs + resource_dirs
|
||||
sys.path[:0] = (
|
||||
exp_dirs
|
||||
+ instr_dirs
|
||||
+ instr_genai_dirs
|
||||
+ sdk_ext_dirs
|
||||
+ prop_dirs
|
||||
+ resource_dirs
|
||||
)
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
|
@ -24,7 +24,7 @@ installed separately via pip:
|
||||
pip install opentelemetry-instrumentation-{instrumentation}
|
||||
pip install opentelemetry-sdk-extension-{sdk-extension}
|
||||
|
||||
A complete list of packages can be found at the
|
||||
A complete list of packages can be found at the
|
||||
`Contrib repo instrumentation <https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation>`_
|
||||
and `Contrib repo exporter <https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/exporter>`_ directories.
|
||||
|
||||
@ -50,6 +50,7 @@ install <https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs>
|
||||
cd opentelemetry-python-contrib
|
||||
pip install -e ./instrumentation/opentelemetry-instrumentation-flask
|
||||
pip install -e ./instrumentation/opentelemetry-instrumentation-botocore
|
||||
pip install -e ./instrumentation-genai/opentelemetry-instrumentation-openai-v2
|
||||
pip install -e ./sdk-extension/opentelemetry-sdk-extension-aws
|
||||
pip install -e ./resource/opentelemetry-resource-detector-container
|
||||
|
||||
@ -62,6 +63,14 @@ install <https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs>
|
||||
|
||||
instrumentation/**
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: OpenTelemetry Generative AI Instrumentations
|
||||
:name: Generative AI Instrumentations
|
||||
:glob:
|
||||
|
||||
instrumentation-genai/**
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: OpenTelemetry Propagators
|
||||
|
7
docs/instrumentation-genai/openai.rst
Normal file
7
docs/instrumentation-genai/openai.rst
Normal file
@ -0,0 +1,7 @@
|
||||
OpenTelemetry Python - OpenAI Instrumentation
|
||||
=============================================
|
||||
|
||||
.. automodule:: opentelemetry.instrumentation.openai_v2
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
@ -24,6 +24,7 @@ py-class=
|
||||
httpx.Client
|
||||
httpx.AsyncClient
|
||||
httpx.BaseTransport
|
||||
openai.BaseTransport
|
||||
httpx.AsyncBaseTransport
|
||||
httpx.SyncByteStream
|
||||
httpx.AsyncByteStream
|
||||
|
Reference in New Issue
Block a user