great! It works with GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY=True too, which means I can keep Agent Engine built-in telemetry
yep, correct
the solution was to replace the register() with the code you sent me and to set OTEL_PYTHON_TRACER_PROVIDER
one last question - is it possible to get the traces in Phoenix with GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY=True? I suspect the answer is No, but I'll check it out anyway
Thank you so much for your help!
I added os.environ["OTEL_PYTHON_TRACER_PROVIDER"] = "otel_sdk_tracer_provider" and redeployed the agent again. Now I see traces.
thank you. Redeploying the agent
I redeployed the agent with new API key and I noticed what I messed before - WARNING: Overriding of current TracerProvider is not allowed"
I killed old API key. Double-checking - I have to use System API key, correct?
--entrypoint-object="agent_engine"
it's a root agent wrapped in AgentEngineApp