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

[release/v1.28.x-0.49bx] Add openai instrumentation to opentelemetry-bootstrap (#2996) #3010

Open
wants to merge 2 commits into
base: release/v1.28.x-0.49bx
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
> The following components are released independently and maintain individual CHANGELOG files.
> Use [this search for a list of all CHANGELOG.md files in this repo](https://github.com/search?q=repo%3Aopen-telemetry%2Fopentelemetry-python-contrib+path%3A**%2FCHANGELOG.md&type=code).

## Unreleased

### Added

- Add `opentelemetry-instrumentation-openai-v2` to `opentelemetry-bootstrap`
([#2996](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2996))

### Fixed

### Breaking changes

## Version 1.28.1/0.49b1 (2024-11-08)

### Added
Expand Down
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.49b1",
Expand Down
11 changes: 10 additions & 1 deletion scripts/otel_packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,23 @@
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
Loading