autogen icon indicating copy to clipboard operation
autogen copied to clipboard

Improving OTEL tracing by adding more details about each message

Open ekzhu opened this issue 8 months ago • 1 comments

Confirmation

  • [x] I confirm that I am a maintainer and so can use this template. If I am not, I understand this issue will be closed and I will be asked to use a different template.

Issue body

As discussed here: https://github.com/microsoft/autogen/pull/5853#issuecomment-2712308316

We need to add more attributes to the OTEL traces emitted by the runtime to make it easier to understand what are inside the messages.

ekzhu avatar Mar 11 '25 05:03 ekzhu

Hi, @ekzhu. Can I ask about the timeline of this fix?

TomeHirata avatar Apr 09 '25 01:04 TomeHirata

Hi @ekzhu, I'm Yuki from MLflow team. This issue is a dependency for us to integrate AutoGen 0.4>= with MLflow Tracing. Could you provide an update or a timeline for resolving this issue? Thank you.

B-Step62 avatar Apr 30 '25 23:04 B-Step62

Hi @ekzhu, I'm Yuki from MLflow team. This issue is a dependency for us to integrate AutoGen 0.4>= with MLflow Tracing. Could you provide an update or a timeline for resolving this issue? Thank you.

Hi Yuki,

Sorry for the delay. We will address this soon but hope to get more details about your requirements, if any.

ekzhu avatar May 04 '25 06:05 ekzhu

Hi, @ekzhu. Thank you for the reply. As I've requested in the original ticket, we hope to have input and output of each agent action (on_message handling) captured as span attributes. Specifically, it would be great if we could have following information

  • Serialized input message content
  • Serialized input message context
  • Handler class name
  • Handler agent name
  • Returned message in case of the direct message
  • Messages sent by the handler (through send_message) if any

Also we'd appreciate it if you could share the expected timeline of the fix. Thank you.

TomeHirata avatar May 04 '25 08:05 TomeHirata

I will begin working on this task as soon as I finish something I'm currently working on. Probably in the next day or so. I'll keep this issue updated

peterychang avatar May 07 '25 14:05 peterychang

This PR adds the following information to the attributes if they are available:

  • sender agent's type and class
  • receiver agent's type and class
  • serialized message context
  • serialized message

These attributes will be added for:

  • direct messages to agents
  • responses to direct messages
  • published messages -- updated once for every agent that receives the message

peterychang avatar May 09 '25 18:05 peterychang