{"library":"openinference-instrumentation-vertexai","title":"OpenInference VertexAI Instrumentation","description":"OpenInference instrumentation for Google Vertex AI model calls, enabling tracing and observability via OpenTelemetry. Version 0.1.13 supports Python 3.10-3.13. Actively maintained.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install openinference-instrumentation-vertexai"],"cli":null},"imports":["from openinference_instrumentation_vertexai import VertexAIInstrumentor"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from openinference_instrumentation_vertexai import VertexAIInstrumentor\nfrom opentelemetry import trace\nfrom opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter\nfrom opentelemetry.sdk.trace import TracerProvider\nfrom opentelemetry.sdk.trace.export import SimpleSpanProcessor\nimport vertexai\nimport os\n\n# Set up OpenTelemetry tracing\nprovider = TracerProvider()\nexporter = OTLPSpanExporter(endpoint=os.environ.get('OTEL_EXPORTER_OTLP_ENDPOINT', ''))\nprovider.add_span_processor(SimpleSpanProcessor(exporter))\ntrace.set_tracer_provider(provider)\n\n# Instrument Vertex AI\nVertexAIInstrumentor().instrument()\n\n# Now use Vertex AI normally\nvertexai.init(project=os.environ.get('GOOGLE_CLOUD_PROJECT', ''), location='us-central1')","lang":"python","description":"Initialize OpenTelemetry tracing, instrument Vertex AI with VertexAIInstrumentor, then use Vertex AI normally.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}