Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add openai instrumentation to opentelemetry-bootstrap #2996

Merged
merged 17 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
221f15d
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Aug 29, 2024
be195a0
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Sep 5, 2024
0a67d3e
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Sep 16, 2024
8c30c01
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Sep 16, 2024
d58428b
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Oct 28, 2024
d74b956
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Oct 30, 2024
e72d03f
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Nov 4, 2024
135a0cf
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Nov 5, 2024
decead3
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Nov 7, 2024
45db48a
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Nov 7, 2024
e29da5e
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Nov 7, 2024
35f9fd8
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Nov 8, 2024
f2773d6
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Nov 12, 2024
0b7fec7
genai
lzchen Nov 12, 2024
dcfedb0
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
lzchen Nov 12, 2024
fd4f8c6
ruff
lzchen Nov 12, 2024
aa08220
Merge branch 'main' into bootstrap
lzchen Nov 12, 2024
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
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)
lzchen marked this conversation as resolved.
Show resolved Hide resolved
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
Loading