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

Include more request configuration options into the span attributes for the Google GenAI SDK instrumentation #3374

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

michaelsafyan
Copy link
Contributor

@michaelsafyan michaelsafyan commented Mar 19, 2025

Description

Improves the comprehensiveness and uniformity of reporting span-level attributes for Google GenAI SDK operations.

This essentially dumps all of the configuration options into span attributes, with a vendor-specific prefix. The subset of request options that are defined in OTel Semantic Conventions are then renamed to match conventions.

In service of the above, this change also:

  1. Adds a flatten_dict util used to generate the span attributes.
  2. Adds tests to more fully cover the set of attributes that are included.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Added more integration tests, covering the relevant changes.

Does This PR Require a Core Repo Change?

  • No.

Checklist:

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

@michaelsafyan
Copy link
Contributor Author

Friendly ping. Is it possible to get this reviewed?

@xrmx
Copy link
Contributor

xrmx commented Mar 31, 2025

I approved the PR because I think this would be helpful for you to move forward but would be nice to add a google genai specific section to the genai semantic conventions with these attributes you are exporting. Now it's really opaque and we don't have assertions on what we are actually exporting.

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