Skip to content

Update vertexai instrumentation to be in-line with the latest semantic conventions part 2#3799

Merged
aabmass merged 19 commits intoopen-telemetry:mainfrom
DylanRussell:vertexai_v4
Oct 3, 2025
Merged

Update vertexai instrumentation to be in-line with the latest semantic conventions part 2#3799
aabmass merged 19 commits intoopen-telemetry:mainfrom
DylanRussell:vertexai_v4

Conversation

@DylanRussell
Copy link
Copy Markdown
Contributor

@DylanRussell DylanRussell commented Sep 30, 2025

Description

Follow up to #3709. Finish updating the vertex ai instrumentation to use the semantic convention changes made in open-telemetry/semantic-conventions#2179.

Updates the instrumentation to call the completion hook as well. I think we need to update the completion hook to not upload anything when an empty list is passed to it. Right now it uploads empty list of system instructions / inputs / outputs if that's what's passed to it.

Type of change

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

How Has This Been Tested?

Unit tests

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • [ x] No.

Checklist:

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

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

@aabmass
Copy link
Copy Markdown
Member

aabmass commented Oct 1, 2025

Right now it uploads empty list of system instructions / inputs / outputs if that's what's passed to it.

SGTM the hook should also not stamp a reference in this case I think.

Copy link
Copy Markdown
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.

Awesome!

Comment thread cassettes/test_tool_events_no_content Outdated
Comment thread instrumentation-genai/opentelemetry-instrumentation-vertexai/examples/manual/.env Outdated
Comment thread cassettes/test_tool_events_no_content.yaml Outdated
Comment thread instrumentation-genai/opentelemetry-instrumentation-vertexai/tests/conftest.py Outdated
Comment thread tests/cassettes/test_tool_events_no_content.yaml Outdated
@DylanRussell
Copy link
Copy Markdown
Contributor Author

I can't get docs to pass. "reference target not found: json.encoder.JSONEncoder" --> not sure how to resolve that.

@aabmass aabmass merged commit 28eed8f into open-telemetry:main Oct 3, 2025
638 checks passed
sightseeker added a commit to sightseeker/opentelemetry-python-contrib that referenced this pull request Mar 11, 2026
…c conventions part 2 (open-telemetry#3799)

* More changes

* Update instrumentation to emit spans in the new format, call the upload hook

* Update example and changelog

* Fix linter
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.

6 participants