Skip to content

GenAI Utils Structure #3672

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

Merged
merged 18 commits into from
Aug 15, 2025

Conversation

keith-decker
Copy link
Contributor

@keith-decker keith-decker commented Aug 4, 2025

Description

This PR creates the Structure for the GenAI Utils package. The GenAI Utils package will include boilerplate and helpers to standardize instrumentation for Generative AI. Once implementation is complete, this package will provide APIs and decorators to minimize the work needed to instrument genai libraries, while providing standardization for generating both types of otel, "spans and metrics" and "spans, metrics and events"

Here's a link to the design document for the upcoming implementation: https://docs.google.com/document/d/1w9TbtKjuRX_wymS8DRSwPA03_VhrGlyx65hHAdNik1E/edit?tab=t.qneb4vabc1wc#heading=h.kh4j6stirken

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

N/A - No tests in this structure PR

  • Test A

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@keith-decker keith-decker requested a review from a team as a code owner August 4, 2025 15:35
@keith-decker keith-decker marked this pull request as draft August 4, 2025 15:35
@keith-decker keith-decker marked this pull request as ready for review August 4, 2025 16:07
@keith-decker
Copy link
Contributor Author

@pmcollins - Mind taking a look?

@keith-decker keith-decker changed the title GenAI SDK Structure GenAI Utils Structure Aug 4, 2025
@zhirafovod
Copy link

LGTM. @aabmass could you review it?

Copy link
Member

@pmcollins pmcollins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment -- other than that LGTM.

Copy link
Member

@aabmass aabmass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The http util that lives in this same directory is a little different

  • named opentelemetry-util-http
  • python package is opentelemetry.util.http

WDYT of copying that pattern here? Asking because we can't easily change the package name on PyPI once published

@aabmass
Copy link
Member

aabmass commented Aug 13, 2025

Can you also add this package to the Pyright config like we did in #3646?

I noticed we didn't add the tox boilerplate either, but we missed it for the other boilerplate PRs too. Please make sure it gets added in the future PRs, since that makes the tests run

@keith-decker
Copy link
Contributor Author

The http util that lives in this same directory is a little different

  • named opentelemetry-util-http
  • python package is opentelemetry.util.http

WDYT of copying that pattern here? Asking because we can't easily change the package name on PyPI once published

I think that's fine, the name has been updated

@keith-decker
Copy link
Contributor Author

Can you also add this package to the Pyright config like we did in #3646?

I noticed we didn't add the tox boilerplate either, but we missed it for the other boilerplate PRs too. Please make sure it gets added in the future PRs, since that makes the tests run

Tox Boilerplate has been added with a basic test for version check to make tox pass.

@keith-decker
Copy link
Contributor Author

@aabmass The failing checks refer to a module "asyncclick". These checks showed up after merging main back into this branch.

Is this something I should investigate in this PR?

Copy link
Member

@aabmass aabmass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ty! One nit and I'll merge

@aabmass
Copy link
Member

aabmass commented Aug 14, 2025

@aabmass The failing checks refer to a module "asyncclick". These checks showed up after merging main back into this branch.

Seems like an issue in main sorry

@aabmass
Copy link
Member

aabmass commented Aug 15, 2025

Thanks for your patience. I reserved the package name on PyPI as well

@aabmass aabmass merged commit bbcdf8b into open-telemetry:main Aug 15, 2025
632 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants