Add openai instrumentation to opentelemetry-bootstrap (#2996)
This commit is contained in:
parent
89a0b28a09
commit
e3ba54b95c
|
|
@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
- `opentelemetry-instrumentation-sqlalchemy` Update unit tests to run with SQLALchemy 2
|
- `opentelemetry-instrumentation-sqlalchemy` Update unit tests to run with SQLALchemy 2
|
||||||
([#2976](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2976))
|
([#2976](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2976))
|
||||||
|
- Add `opentelemetry-instrumentation-openai-v2` to `opentelemetry-bootstrap`
|
||||||
|
([#2996](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2996))
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ dependencies = [
|
||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
instruments = [
|
instruments = [
|
||||||
"openai >= 1.0.0",
|
"openai >= 1.26.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.entry-points.opentelemetry_instrumentor]
|
[project.entry-points.opentelemetry_instrumentor]
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,10 @@
|
||||||
# RUN `python scripts/generate_instrumentation_bootstrap.py` TO REGENERATE.
|
# RUN `python scripts/generate_instrumentation_bootstrap.py` TO REGENERATE.
|
||||||
|
|
||||||
libraries = [
|
libraries = [
|
||||||
|
{
|
||||||
|
"library": "openai >= 1.26.0",
|
||||||
|
"instrumentation": "opentelemetry-instrumentation-openai-v2==2.1b0.dev",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"library": "aio_pika >= 7.2.0, < 10.0.0",
|
"library": "aio_pika >= 7.2.0, < 10.0.0",
|
||||||
"instrumentation": "opentelemetry-instrumentation-aio-pika==0.50b0.dev",
|
"instrumentation": "opentelemetry-instrumentation-aio-pika==0.50b0.dev",
|
||||||
|
|
|
||||||
|
|
@ -21,14 +21,23 @@ import tomli
|
||||||
scripts_path = os.path.dirname(os.path.abspath(__file__))
|
scripts_path = os.path.dirname(os.path.abspath(__file__))
|
||||||
root_path = os.path.dirname(scripts_path)
|
root_path = os.path.dirname(scripts_path)
|
||||||
instrumentations_path = os.path.join(root_path, "instrumentation")
|
instrumentations_path = os.path.join(root_path, "instrumentation")
|
||||||
|
genai_instrumentations_path = os.path.join(root_path, "instrumentation-genai")
|
||||||
|
|
||||||
|
|
||||||
def get_instrumentation_packages():
|
def get_instrumentation_packages():
|
||||||
for pkg in sorted(os.listdir(instrumentations_path)):
|
pkg_paths = []
|
||||||
|
for pkg in os.listdir(instrumentations_path):
|
||||||
pkg_path = os.path.join(instrumentations_path, pkg)
|
pkg_path = os.path.join(instrumentations_path, pkg)
|
||||||
if not os.path.isdir(pkg_path):
|
if not os.path.isdir(pkg_path):
|
||||||
continue
|
continue
|
||||||
|
pkg_paths.append(pkg_path)
|
||||||
|
for pkg in os.listdir(genai_instrumentations_path):
|
||||||
|
pkg_path = os.path.join(genai_instrumentations_path, pkg)
|
||||||
|
if not os.path.isdir(pkg_path):
|
||||||
|
continue
|
||||||
|
pkg_paths.append(pkg_path)
|
||||||
|
|
||||||
|
for pkg_path in sorted(pkg_paths):
|
||||||
try:
|
try:
|
||||||
version = subprocess.check_output(
|
version = subprocess.check_output(
|
||||||
"hatch version",
|
"hatch version",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue