2.0.0b4 (2026-05-21)
Features Added
- Added
_platform_headersmodule with cross-cutting protocol header name constants (x-request-id,x-platform-server,x-agent-session-id,x-platform-error-source,x-platform-error-detail, and others). Protocol packages now import shared header name strings from core instead of maintaining their own copies. - Added
TraceContextMiddleware— a lightweight pure-ASGI middleware that propagates W3C trace context (traceparent,tracestate) and baggage from incoming HTTP requests. Any spans created by downstream frameworks (e.g. MAF / agent-framework) are automatically children of the caller's trace without additional framework spans. - Added
enable_sensitive_dataparameter toconfigure_observability()to control whether prompts, tool arguments, and results are recorded in telemetry. RespectsOTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENTenvironment variable. - Added A365 tracing export support — when
FOUNDRY_HOSTING_ENVIRONMENTandFOUNDRY_AGENT365_TRACING_ENABLEDare set, telemetry is exported via the A365 observability pipeline. - Added
resolve_agent_id(),resolve_agent_blueprint_id(), andresolve_agent_tenant_id()config helpers for new Foundry environment variables (FOUNDRY_AGENT_INSTANCE_CLIENT_ID,FOUNDRY_AGENT_BLUEPRINT_CLIENT_ID,FOUNDRY_AGENT_TENANT_ID). - Added
gen_ai.agent.blueprint.idandmicrosoft.tenant.idspan attributes to theFoundryEnrichmentSpanProcessor. AgentConfig.ws_ping_interval— new field resolved from theWS_KEEPALIVE_INTERVALenvironment variable (auto-injected by AgentService into hosted-agent containers).0disables; negative/non-finite values raiseValueErrorat startup.AgentServerHost._build_hypercorn_configwires this into Hypercorn'swebsocket_ping_intervalso any protocol package serving WebSocket routes inherits keep-alive without per-package wiring.
Breaking Changes
- Removed
request_span()method fromAgentServerHost. Trace context propagation is now handled automatically byTraceContextMiddleware.