Musterby Elitery
Integrations

Google Vertex AI

Trace Vertex AI calls in Muster via the OpenInference Vertex AI instrumentation.

Google Vertex AI is Google Cloud's unified platform for building, deploying, and managing machine learning and generative AI. Muster captures Vertex AI calls through the OpenInference Vertex AI instrumentation.

Setup

1. Install dependencies

pip install langfuse google-cloud-aiplatform openinference-instrumentation-vertexai

2. Configure credentials

import os

os.environ["LANGFUSE_PUBLIC_KEY"] = "pk-lf-..."
os.environ["LANGFUSE_SECRET_KEY"] = "sk-lf-..."
os.environ["LANGFUSE_BASE_URL"] = "https://app.getmuster.io"

Set up Application Default Credentials for Google Cloud via a service account key (gcloud auth application-default login or GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json).

3. Initialize the client and instrumentation

from langfuse import get_client
from openinference.instrumentation.vertexai import VertexAIInstrumentor

langfuse = get_client()
if langfuse.auth_check():
    print("Muster client is authenticated and ready!")

VertexAIInstrumentor().instrument()

4. Run a request

import vertexai
from vertexai.generative_models import GenerativeModel

vertexai.init(project="your-project-id", location="europe-central2")

model = GenerativeModel("gemini-2.5-flash")
resp = model.generate_content("What is Muster?")
print(resp.text)

Add user/session attributes

from langfuse import propagate_attributes

with propagate_attributes(user_id="user_123", session_id="sess_abc", tags=["vertex"]):
    model.generate_content(...)

See also