Hi, I would really appreciate any help with integration of Phoenix with Google ADK agent deployed to AgentEngine. I see the traces in Phoenix when I run the agent locally using 'test_adk_phoenix.py' script. However, when I deploy the agent to Google AgentEngine and test it from there, I see no errors in the logs and no traces in Phoenix. I use the following environment variables: OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=True, GOOGLE_GENAI_USE_VERTEXAI=True, GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY=False. The Phoenix API key is the System API key. What am I doing wrong?
💡 Hint: Mention RunLLM in the thread for followups.
GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY=False and I use GoogleADKInstrumentor().instrument(tracer_provider=tracer_provider)
the Phoenix endpoint and API key are available and correct, because I see the traces when I run the agent locally
Hi Elena. Was the Phoenix Google ADK Agent Engine deployment guide (referenced above by the bot) helpful for you?
Hey Roger. No, it didn't help. As I said, I've already used GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY=False and GoogleADKInstrumentor().instrument(tracer_provider=tracer_provider)
I think, arize-otel is for Arize, not for Phoenix
it should be exchangeable. let me ask the team
thank you
what does your deploy script look like?
something like this?
import os
import vertexai
from vertexai import agent_engines
project_id = os.environ.get("GOOGLE_CLOUD_PROJECT")
if not project_id:
raise RuntimeError("Set GOOGLE_CLOUD_PROJECT before deploying.")
# Initialize the Vertex AI client
vertexai.init(project=project_id, location=os.environ.get("GOOGLE_CLOUD_LOCATION", "us-central1"))
client = vertexai.Client(project=project_id, location=os.environ.get("GOOGLE_CLOUD_LOCATION", "us-central1"))
print("Deploying ADK Agent to Vertex AI Agent Engine...")
remote_agent = client.agent_engines.create(
# Tell Agent Engine to run the 'agent_engine' object inside 'agent.py'
agent_engine=agent_engines.ModuleAgent(module_name="agent", agent_name="agent_engine"),
config={
"requirements": [
"google-cloud-aiplatform[agent_engines,adk]>=1.139.0",
"openinference-instrumentation-google-adk>=0.1.9",
"arize-phoenix-otel>=0.15.0",
],
"extra_packages": [
"agent.py",
"agent_engine_app.py",
],
"env_vars": {
"GOOGLE_CLOUD_PROJECT": project_id,
"PHOENIX_COLLECTOR_ENDPOINT": os.environ.get("PHOENIX_COLLECTOR_ENDPOINT", "https://app.phoenix.arize.com/v1/traces"),
"PHOENIX_PROJECT_NAME": os.environ.get("PHOENIX_PROJECT_NAME", "default"),
"PHOENIX_API_KEY": os.environ.get("PHOENIX_API_KEY", ""),
}
}
)
print(f"Deployment complete! Agent Resource Name: {remote_agent.api_resource.name}")
it works fine. The agent is deployed to AgentEngine and the agent itself works. Environment variables: OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=True, GOOGLE_GENAI_USE_VERTEXAI=True, GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY=False
