Enable OTel instrumentation and propagation#650
Conversation
|
There are comments in a test showing the use of the new flags. Maybe these should instead be added to one of the cookbooks (or a new one be created). |
|
Can you provide some more information about why this is required? I don't completely follow why the existing guidance from https://mozilla-ai.github.io/any-agent/tracing/#adding-an-opentelemetry-exporter isn't sufficient. |
|
@javiermtorres thanks for the clarification. Are there any alternatives? Like, could we have some mechanism to pass a context id between a server and client? I don't have a handle on what options are available to solve the problem. |
|
The basic info on distributed tracing can be found here: https://opentelemetry.io/docs/concepts/context-propagation/ This solution is pretty standard: we only need to add the appropriate intrumentation packages, instrument a couple of objects, and we're done. It's optional and disabled by default after all, because the casual user won't need to correlate traces on A2A-distributed agents since they can always use https://mozilla-ai.github.io/any-agent/agents/tools/#callables and gather everything locally. But in a distributed setting, this will help. Maybe I should add a small piece about how to instrument an httpx client so that an A2A served agent can be appropriately traced out of the use of the A2A tool. |
|
This PR is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 3 days. |
|
This will be closed since the user is expected to provide their own tracing facilities. A follow up PR will provide the hooks a user would need to instrument the library appropriately. |

This PR adds optional flags to enable OTel distributed tracing in the httpx/starlette packages.