Skip to main content

OpenInference Google VertexAI Instrumentation

Python auto-instrumentation library for VertexAI SDK and the Google Cloud AI Platform. Traces are fully OpenTelemetry compatible and can be sent to any OpenTelemetry collector for viewing, such as Arize Phoenix or Arize AX.

pypi

Installation

pip install -Uqqq openinference-instrumentation-vertexai

Quickstart

Install openinference-instrumentation-vertexai and arize-phoenix.

pip install -U \
    openinference-instrumentation-vertexai \
    arize-phoenix \
    opentelemetry-sdk \
    opentelemetry-exporter-otlp \
    "opentelemetry-proto>=1.12.0"

Start the phoenix server so that it is ready to receive traces. The phoenix server runs entirely on your machine and does not send data over the internet.

python -m phoenix.server.main serve

Instrumenting vertexai is simple.

from openinference.instrumentation.vertexai import VertexAIInstrumentor
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import SimpleSpanProcessor

endpoint = "http://127.0.0.1:4317"
tracer_provider = TracerProvider()
tracer_provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter(endpoint)))

VertexAIInstrumentor().instrument(tracer_provider=tracer_provider)

Now, all calls by generative_models are instrumented and can be viewed in the phoenix UI.

import vertexai
from vertexai.generative_models import GenerativeModel

vertexai.init(location="us-central1")
model = GenerativeModel("gemini-1.5-flash")

print(model.generate_content("Why is sky blue?"))

More Info

Metadata

Release files for openinference-instrumentation-vertexai 0.1.29

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openinference-instrumentation-vertexai 0.1.29
File Size Uploaded
openinference_instrumentation_vertexai-0.1.29.tar.gz 23.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openinference-instrumentation-vertexai 0.1.29
File Interpreter ABI Platform
openinference_instrumentation_vertexai-0.1.29-py3-none-any.whl Python 3 none any Details

Total release size: 41.5 kB

Release files / openinference_instrumentation_vertexai-0.1.29.tar.gz

Download URL openinference_instrumentation_vertexai-0.1.29.tar.gz
Size 23.2 kB
Tags Source
SHA-256 checksum
How to use checksums
58f9ddd38e57bba58b8c73683284053ed3c14ecd7a1d930dc18bbc12a49f76f3
BLAKE2b-256 checksum
How to use checksums
e947578310e3d9f20eef0aece68a175b6c2d03446582c71174a669957c427989
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / openinference_instrumentation_vertexai-0.1.29-py3-none-any.whl

Download URL openinference_instrumentation_vertexai-0.1.29-py3-none-any.whl
Size 18.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aef22389eefb9fa139bbea580c60c9bfb9d4b5299d806c7bda45865c969f5f51
BLAKE2b-256 checksum
How to use checksums
a570fed72d652f04ded8ec02b6824918aae20b960b2dde3e9c60e903b4d9cfff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.29 This release

2 release files

0.1.25

2 release files

0.1.22

2 release files

0.1.21

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page