feat: propagate OTel context in async ops and fix TransportProtocol config injection#707
feat: propagate OTel context in async ops and fix TransportProtocol config injection#707ehsavoie wants to merge 1 commit intoa2aproject:mainfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the A2A framework by improving configuration flexibility and adding OpenTelemetry context propagation for asynchronous operations. It addresses an issue with enum conversion and introduces a managed executor to ensure proper tracing in asynchronous environments. Highlights
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces two main changes. First, it addresses a configuration issue with TransportProtocol enums containing a '+' by changing the injection from an enum to a String and parsing it manually. This is a solid workaround. Second, it enhances the OpenTelemetry integration by adding an alternative AsyncExecutorProducer that uses a ManagedExecutor to ensure OTel context propagation across async operations. This is a significant improvement for observability in asynchronous code. The changes are well-implemented, documented in a new README, and accompanied by a comprehensive set of unit tests. My only suggestion is a minor correction in the new README file to ensure the documented error message matches the one in the code.
…onfig injection - Replace direct TransportProtocol enum injection in AgentCardProducer with String injection + TransportProtocol.fromString() to avoid SmallRye Config's HyphenateEnumConverter failing on "HTTP+JSON" values passed via -D flags - Add AsyncManagedExecutorProducer to the OpenTelemetry extras module, using MicroProfile ManagedExecutor to propagate OTel trace context across async boundaries (priority 20, overrides default AsyncExecutorProducer) - Add microprofile-context-propagation-api dependency to opentelemetry/server Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
|
@ehsavoie amazing stuff! |
Fixes #698 🦕