Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use `wrapt` instead of `functools.wraps` to monkey patch the SDK.
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ Limitations
***********

When using the Google GenAI SDK with automatic function calling enabled,
the OpenTelemetry instrumentation creates a span only for the top-level
``generate_content`` call.
the OpenTelemetry instrumentation creates an ``execute_tool`` span for each tool call the SDK executes,
these spans are nested under the ``generate_content`` span.

Internal model or tool calls triggered automatically by the SDK are executed
within the SDK internals and are not traced as separate spans.
Only tool calls that the SDK executes are traced, if you disable the automatic function calling and instead
do the function calling in your application, our instrumentation cannot trace them.


Enabling message content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Here are some TODO items required to achieve stability for this package:
- Including tool invocation information
- Emit events for safety ratings when they block responses
- Additional cleanup/improvement tasks such as:
- Adoption of 'wrapt' instead of 'functools.wraps'
- Bolstering test coverage

## Future
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ dependencies = [
"opentelemetry-instrumentation >=0.61b0, <2",
"opentelemetry-semantic-conventions >=0.61b0, <2",
"opentelemetry-util-genai >= 0.4b0, <2",
"wrapt >= 1.0.0, < 3.0.0",
]

[project.optional-dependencies]
Expand Down
Loading
Loading