python/google-adk: Migrate to Microsoft OpenTelemetry Distro, GA SDK 1.0.0, and align docs with production#317
Open
Yogeshp-MSFT wants to merge 3 commits into
Open
Conversation
Author
|
Hi @biswapm can you review this pr? |
0188a61 to
205ce4d
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (1)
python/google-adk/sample-agent/pyproject.toml:17
main.pyandagent.pynow import frommicrosoft.opentelemetry, butpyproject.tomldoes not listmicrosoft-opentelemetryas an explicit dependency. If it isn't a guaranteed transitive dependency of the listed packages, installs viapip install ./uv synccan fail at runtime withModuleNotFoundError. Addmicrosoft-opentelemetryto[project].dependencies(with an appropriate version constraint consistent with the sample).
# Google ADK -- official package (1.32+ lifted the otel<1.39 constraint)
"google-adk>=1.32.0,<2",
# Microsoft Agents SDK - Official packages for hosting and integration
"microsoft-agents-hosting-aiohttp",
"microsoft-agents-hosting-core",
"microsoft-agents-authentication-msal",
"microsoft-agents-activity",
Author
|
Hi @biswapm @microsoft/agent365-approvers can you review this pr? |
ajmfehr
reviewed
Jun 17, 2026
c741e0f to
c61436e
Compare
…and Microsoft OpenTelemetry
…ps, redact identity logs - pyproject.toml: add microsoft-opentelemetry, microsoft-agents-a365-observability-hosting, and microsoft-agents-a365-runtime to [project].dependencies (previously imported but undeclared); align minimum version constraints with requirements.txt so pip install . / uv sync produce consistent graphs - agent.py: downgrade observability identity log from INFO to DEBUG and mask agent_id / tenant_id to last 4 chars to avoid leaking sensitive identifiers in production logs (source label retained for diagnostics)
c61436e to
e45dc57
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades the Google ADK sample agent to the Microsoft OpenTelemetry Distro (
microsoft-opentelemetry),bumps all A365 SDK packages to GA 1.0.0, removes otel version pinning workarounds, and aligns all
documentation with the current codebase and production webapp configuration.
Code changes
agent.pyBaggageBuilderimport frommicrosoft_agents_a365.observability.core.middleware.baggage_builderto
microsoft.opentelemetry.a365.core(new distro path)agentic_user_idtoagentic_app_idforagent_idinbaggage — the observability backend requires agent_id on the route, token azp, and span
gen_ai.agent.idto all match the app instance IDmain.pyconfigure()frommicrosoft_agents_a365.observability.core.configwithuse_microsoft_opentelemetry()from the newmicrosoft.opentelemetrydistroA365_AGENT_APP_INSTANCE_ID/A365_AGENTIC_USER_IDenv vars andCONNECTIONS__SERVICE_CONNECTION__SETTINGS__*hosting.pyAGENT_LIFECYCLEnotification handler — lifecycle notifications (onboarding, etc.) don'tsupport replies; previously caused errors when the agent tried to reply
pyproject.tomlgoogle-adkfrom>=1.18.0to>=1.32.0,<2(1.32+ lifted the otel<1.39 constraint)>= 0.1.0to>= 1.0.0(GA release)override-dependenciesfor otel version pinning — no longer needed with google-adk 1.32+Documentation changes
.env.templateGOOGLE_APPLICATION_CREDENTIALS,GOOGLE_CLOUD_PROJECT,GOOGLE_CLOUD_LOCATION) with inline docs for both Vertex AI and public Gemini API modesA365_AGENT_APP_INSTANCE_IDandA365_AGENTIC_USER_IDplatform fallback varsAGENT365OBSERVABILITY__*vars)AGENT_ID,ALT_BLUEPRINT_NAME,ENABLE_KAIRO_EXPORTER,PYTHON_ENVIRONMENTGOOGLE_GENAI_USE_VERTEXAI— removed duplicate declaration, defaults toFALSEfor Quick StartREADME.md--agent-nameand--aiteammateflags (current CLI syntax)CONNECTIONS__SERVICE_CONNECTION__SETTINGS__SCOPESvalue from<blueprintId>/.defaulttocorrect
5a807f24-c9de-44ee-a3a7-329e88a00ffc/.default(Messaging Bot API)AGENTIC_APP_IDsource — was incorrectly listed as blueprint ID; now correctly documents itas the agent instance app ID from Copilot instance creation
a365.generated.config.json(which is often null for--aiteammateagents)AGENT365OBSERVABILITY__*,A365_AGENT_APP_INSTANCE_ID,A365_AGENTIC_USER_ID,ENABLE_KAIRO_EXPORTER,PYTHON_ENVIRONMENT,GOOGLE_CLOUD_*,GOOGLE_APPLICATION_CREDENTIALS,CONNECTIONSMAP__*,SCM_DO_BUILD_DURING_DEPLOYMENTAGENTIC_*env vars are fallbacks — production gets identity per-messagevia
activity.recipientAGENT-CODE-WALKTHROUGH.mdBaggageBuilderimport path tomicrosoft.opentelemetry.a365.coregemini-2.0-flashtogemini-2.5-flashconfigure()withuse_microsoft_opentelemetry()and updated explanationagentic_app_idinstead ofagentic_user_idmain.pycode block fromconfigure()/run_http_app()touse_microsoft_opentelemetry()/start_server()docs/design.md(full rewrite — was completely outdated)start_with_generic_host.py/GenericAgentHost→main.py/MyAgent/hosting.pygoogle.generativeaiAPI → currentgoogle.adk.agents.Agent/Runnerpatternpyproject.toml(GA 1.0.0 packages)uv run python start_with_generic_host.py→python main.pyTesting
.env.templateand README config tables