Skip to content

Commit

Permalink
genai
Browse files Browse the repository at this point in the history
  • Loading branch information
lzchen committed Nov 12, 2024
1 parent f2773d6 commit 0b7fec7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies = [

[project.optional-dependencies]
instruments = [
"openai >= 1.0.0",
"openai >= 1.26.0",
]

[project.entry-points.opentelemetry_instrumentor]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
# RUN `python scripts/generate_instrumentation_bootstrap.py` TO REGENERATE.

libraries = [
{
"library": "openai >= 1.26.0",
"instrumentation": "opentelemetry-instrumentation-openai-v2==2.1b0.dev",
},
{
"library": "aio_pika >= 7.2.0, < 10.0.0",
"instrumentation": "opentelemetry-instrumentation-aio-pika==0.50b0.dev",
Expand Down
12 changes: 11 additions & 1 deletion scripts/otel_packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,24 @@
scripts_path = os.path.dirname(os.path.abspath(__file__))
root_path = os.path.dirname(scripts_path)
instrumentations_path = os.path.join(root_path, "instrumentation")
genai_instrumentations_path = os.path.join(root_path, "instrumentation-genai")


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)
if not os.path.isdir(pkg_path):
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:
version = subprocess.check_output(
"hatch version",
Expand Down

0 comments on commit 0b7fec7

Please sign in to comment.