opentelemetry-python-contrib
opentelemetry-python-contrib copied to clipboard
Include more request configuration options into the span attributes for the Google GenAI SDK instrumentation
trafficstars
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:
- Adds a
flatten_dictutil used to generate the span attributes. - Adds tests to more fully cover the set of attributes that are included.
Type of change
- [X] 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?
- [X] No.
Checklist:
- [X] Followed the style guidelines of this project
- [X] Changelogs have been updated
- [X] Unit tests have been added
- [X] Documentation has been updated