-
Notifications
You must be signed in to change notification settings - Fork 789
Update google genai instrumentation to work with latest semantic convention, allow for uploading content. #3772
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
base: main
Are you sure you want to change the base?
Conversation
|
...trumentation-google-genai/src/opentelemetry/instrumentation/google_genai/generate_content.py
Outdated
Show resolved
Hide resolved
...trumentation-google-genai/src/opentelemetry/instrumentation/google_genai/generate_content.py
Outdated
Show resolved
Hide resolved
...trumentation-google-genai/src/opentelemetry/instrumentation/google_genai/generate_content.py
Outdated
Show resolved
Hide resolved
...trumentation-google-genai/src/opentelemetry/instrumentation/google_genai/generate_content.py
Outdated
Show resolved
Hide resolved
...trumentation-google-genai/src/opentelemetry/instrumentation/google_genai/generate_content.py
Outdated
Show resolved
Hide resolved
...trumentation-google-genai/src/opentelemetry/instrumentation/google_genai/generate_content.py
Outdated
Show resolved
Hide resolved
e76d888
to
d0d6f1a
Compare
Co-authored-by: Aaron Abbott <[email protected]>
d0d6f1a
to
ee911f5
Compare
5d0572a
to
8583327
Compare
...-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai/instrumentor.py
Outdated
Show resolved
Hide resolved
...lemetry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai/flags.py
Show resolved
Hide resolved
...metry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai/message.py
Outdated
Show resolved
Hide resolved
...metry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai/message.py
Show resolved
Hide resolved
interactions: | ||
- request: | ||
body: |- | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind adding a test for the completion hook somewhere ? https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/instrumentation-genai/opentelemetry-instrumentation-vertexai/tests/test_function_calling_experimental.py#L262 -- this is how I did it for vertex AI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added, PTAL.
instrumentation-genai/opentelemetry-instrumentation-google-genai/tests/requirements.oldest.txt
Show resolved
Hide resolved
…y-python-contrib into genai-instrumentation-semconv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, LGTM! Will merge once Dylan has finished reviewing/approved too.
...trumentation-google-genai/src/opentelemetry/instrumentation/google_genai/generate_content.py
Outdated
Show resolved
Hide resolved
...trumentation-google-genai/src/opentelemetry/instrumentation/google_genai/generate_content.py
Outdated
Show resolved
Hide resolved
...entation-genai/opentelemetry-instrumentation-google-genai/tests/generate_content/test_e2e.py
Show resolved
Hide resolved
...rate_content/cassettes/test_streaming[excludecontent-gemini-2.5-flash-vertexaiapi-sync].yaml
Outdated
Show resolved
Hide resolved
...ate_content/cassettes/test_streaming[excludecontent-gemini-2.5-flash-vertexaiapi-async].yaml
Outdated
Show resolved
Hide resolved
util/opentelemetry-util-genai/src/opentelemetry/util/genai/types.py
Outdated
Show resolved
Hide resolved
...ation-genai/opentelemetry-instrumentation-google-genai/tests/utils/test_tool_call_wrapper.py
Show resolved
Hide resolved
...metry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai/message.py
Show resolved
Hide resolved
...trumentation-google-genai/src/opentelemetry/instrumentation/google_genai/generate_content.py
Outdated
Show resolved
Hide resolved
...rate_content/cassettes/test_streaming[excludecontent-gemini-2.5-flash-vertexaiapi-sync].yaml
Outdated
Show resolved
Hide resolved
…y-python-contrib into genai-instrumentation-semconv
Description
Accomodation of semantic conventions changes made in open-telemetry/semantic-conventions#2179.
Also, when logging the completion details, the upload hook is called, so if user has configured
OTEL_INSTRUMENTATION_GENAI_UPLOAD_BASE_PATH
andOTEL_INSTRUMENTATION_GENAI_UPLOAD_HOOK
env vars, completion details will also be logged as refs (if appropriate capture content env var is set).Type of change
How Has This Been Tested?
Unit tests, manual tests.
Does This PR Require a Core Repo Change?
No
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.