Feature/azure telemetry exporter#1571
Draft
afourniernv wants to merge 5 commits intoNVIDIA:developfrom
Draft
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Add nvidia_nat_a365_telemetry package with plugin registration - Implement stub A365OtelExporter and _ReadableSpanAdapter classes - Add token resolver resolution logic with comprehensive tests - Register plugin in root pyproject.toml (optional-deps, most extra, uv.sources) - Add uv-lock pre-commit hook for new package - Add plugin discovery test Note: Current implementation includes stubs for: - A365OtelExporter.export_otel_spans() (converts OtelSpan to ReadableSpan) - _ReadableSpanAdapter (wraps OtelSpan for A365 SDK compatibility) - Token resolver string-to-callable conversion Full integration with A365's _Agent365Exporter SDK pending SDK availability. Signed-off-by: afourniernv <afournier@nvidia.com> Signed-off-by: afourniernv <afournier@nvidia.com>
- Implement A365MCPToolingConfig for discovering and registering MCP servers - Add A365ToolingService wrapper for A365 SDK integration - Implement delegation pattern with A365MCPToolingFunctionGroup to aggregate multiple MCP servers - Add comprehensive authentication handling (token extraction, provider resolution, user context) - Add 18 integration tests covering delegation, auth flows, and edge cases - Add 7 registration tests for plugin discovery and config validation - Refactor package from nvidia-nat-a365-telemetry to nvidia-nat-a365 (unified package) - Update root pyproject.toml to reflect package rename Signed-off-by: afourniernv <afournier@nvidia.com>
Major Features:
- Add complete A365 front-end plugin implementation:
* A365FrontEndPlugin: Main plugin integrating NAT workflows with Microsoft Agent 365
* A365FrontEndPluginWorker: Worker pattern implementation (462 lines)
- Creates AgentApplication with CloudAdapter, MemoryStorage, MsalConnectionManager
- Sets up message handlers for Teams chat
- Implements notification handlers for Email, Word, Excel, PowerPoint, lifecycle events
- Supports separate workflow routing for notifications via notification_workflow config
- Handles error handling and cleanup
* A365FrontEndConfig: Configuration with Entra ID auth, log_level, notification settings
* Supports custom worker classes via runner_class config option
- Add comprehensive test suite (2000+ lines):
* Front-end integration tests (542 lines)
* Front-end registration tests (233 lines)
* Telemetry exporter integration tests (294 lines)
* Telemetry registration tests (123 lines)
* Tooling auth integration tests (613 lines)
* Tooling registration tests (204 lines)
Refactoring & Improvements:
- Add shared exceptions module (A365Error, A365AuthenticationError, A365ConfigurationError,
A365SDKError, A365WorkflowExecutionError) for consistent error handling
- Refactor tooling module:
* Extract tooling config to separate tooling_config.py file
* Update type hints to Python 3.10+ syntax (| instead of Union/Optional)
* Optimize tool_overrides conversion (move outside loop for efficiency)
* Improve error handling with A365ConfigurationError for validation failures
* Add defensive checks for server.mcp_server_name (handle None/empty)
- Enhance telemetry module:
* Add AuthenticationRef support with proactive token refresh
* Remove string import path option for token_resolver (use AuthenticationRef only)
* Improve token resolver implementation with async/sync bridge
- Remove unused notifications module (functionality implemented directly in worker)
- Update docstrings and error messages throughout
- Update dependencies in pyproject.toml and uv.lock
This commit adds a production-ready A365 front-end plugin with comprehensive test coverage
and improves code quality across telemetry and tooling modules.
- Refactor front-end to Worker pattern with DI support - Add log_level and notification_workflow features - Add AuthenticationRef support for telemetry token resolution - Implement thread-safe token cache with proactive refresh - Add comprehensive test coverage (105 tests, +4 new test files) - Remove duplicate test files and improve test reliability - Improve error handling across all modules - Modernize type hints and remove redundant comments Signed-off-by: afourniernv <afournier@nvidia.com> Co-authored-by: Cursor <cursoragent@cursor.com>
6b21eeb to
99aa124
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.
THIS IS A WIP PR. NOT SUITABLE FOR MERGE.
Description
This PR adds Microsoft Agent 365 (A365) integration components to NeMo Agent Toolkit, enabling NAT workflows to:
What's Implemented
A365 Telemetry Exporter
A365TelemetryExporterintegrating with A365 SDK'sAgent365Exporter_ReadableSpanAdapterfor converting NAT'sOtelSpanto A365'sReadableSpanformatrun_in_executorto handle A365 SDK's synchronous exporterAuthenticationRefintegrationA365 Tooling Integration
A365MCPToolingConfigfunction group for discovering MCP servers from A365 tooling gatewayA365ToolingServicewrapper for A365 SDK integrationA365MCPToolingFunctionGroupdelegation pattern to aggregate multiple discovered MCP serversA365 Front-End Plugin
A365FrontEndPluginfor Bot Framework integrationA365FrontEndPluginWorkerwith dependency injection pattern for SDK componentsMsalConnectionManagerintegration for Entra ID authenticationPackage Structure
nvidia-nat-a365-telemetrytonvidia-nat-a365to reflect expanded scopetelemetry/,tooling/,front_end/submodulesA365AuthenticationError,A365SDKError,A365ConfigurationError,A365WorkflowExecutionError)What This Enables
Testing
Deployment & Configuration
deploy/directorydeploy/test_auth.py)deploy/README.md,deploy/NEXT_STEPS.md)39d13bd9-e35e-4936-a452-9252c593fcce(completed)What's Missing for Full Implementation
End-to-End Testing
Documentation
Azure Setup (Pending)
a365 setup all)Related Issues
By Submitting this PR I confirm: