Summary
Adopt recent Azure Developer CLI extension framework enhancements across azd-exec, azd-app, and azd-core to improve observability, debugging, reliability, and developer experience.
Spec: docs/specs/azd-framework-enhancements/spec.md
Key Enhancements
- Distributed Tracing - OpenTelemetry integration with W3C Trace Context
- Structured Error Handling - Unified error model with origin tracking
- Interactive Extension Support - TUI/interactive mode for extensions
- ServiceContext in Lifecycle Events - Enhanced event context with build artifacts
- Automatic Event Handler Cleanup - Context-based lifecycle management
- WaitForDebugger Export - Public debugger attachment API
- Additional Properties Support - Extension-specific config in azure.yaml
Goals
- ✅ Enhance Observability - Add distributed tracing to azd-exec and azd-app
- ✅ Improve Error Handling - Adopt structured error model across all extensions
- ✅ Better Developer Experience - Export debugger support, interactive mode
- ✅ Leverage Event Context - Utilize ServiceContext in azd-app lifecycle handlers
- ✅ Improve Reliability - Auto cleanup, duplicate prevention
- ✅ Enable Extensibility - Support additional properties for extension config
- ✅ Identify Common Code Opportunities - Extract shared utilities and patterns to azd-core for reuse across extensions
Implementation Plan
Phase 1: Foundation (Week 1) - P0
Phase 2: Error Handling (Week 2) - P1
Phase 3: Event Enhancements (Week 2) - P1
Phase 4: Azure SDK Correlation (Week 3) - P2
Phase 5: Config Extensibility (Week 3-4) - P2
Phase 6: Testing & Documentation (Week 4) - P1
Ongoing: Code Consolidation Analysis
As we implement each phase, actively look for:
- Duplicate code between azd-exec and azd-app that could be shared
- Common patterns (config parsing, Azure SDK setup, error handling)
- Utility functions that would benefit multiple extensions
- Testing helpers that could be reused
- Documentation patterns and helper code
Candidates for azd-core:
- Config extraction helpers (AdditionalProperties parsing)
- Azure SDK client factory with tracing/correlation
- Common error handling/categorization utilities
- Extension lifecycle helpers
- Test fixtures and utilities
Benefits
- End-to-end trace visibility from azd through extensions to Azure services
- Consistent error categorization with better telemetry
- Improved debugging experience with standardized debugger attachment
- Richer context in lifecycle events
- No memory leaks from automatic handler cleanup
- Extension configuration lives with project config in azure.yaml
- Reduced duplication and improved maintainability via shared azd-core utilities
- Faster extension development with reusable components
Dependencies
- Requires azd >= 1.22.0
- Impacts: azd-exec, azd-app, azd-core repositories
Summary
Adopt recent Azure Developer CLI extension framework enhancements across azd-exec, azd-app, and azd-core to improve observability, debugging, reliability, and developer experience.
Spec: docs/specs/azd-framework-enhancements/spec.md
Key Enhancements
Goals
Implementation Plan
Phase 1: Foundation (Week 1) - P0
Phase 2: Error Handling (Week 2) - P1
Phase 3: Event Enhancements (Week 2) - P1
Phase 4: Azure SDK Correlation (Week 3) - P2
Phase 5: Config Extensibility (Week 3-4) - P2
Phase 6: Testing & Documentation (Week 4) - P1
Ongoing: Code Consolidation Analysis
As we implement each phase, actively look for:
Candidates for azd-core:
Benefits
Dependencies