Expanding Input Messages Beyond LLMs in OpenTelemetry Spans
Hey is there possibility to display input messages for other kinds of span than the LLM kind I tried
class ChatMessage(TypedDict):
role: str
content: str
def trace_messages(messages: list[ChatMessage], span: Span):
for i, msg in enumerate(messages):
for field in ['role', 'content']:
span.set_attribute(f"input.messages.{i}.{field}", msg[field])as per https://arize.com/docs/ax/learn/tracing-concepts/openinference-semantic-conventions#transforming-messages-into-opentelemetry-span-attributes I know this is for AX but it's weird input.messages is not a field available in the https://github.com/Arize-ai/openinference/blob/main/spec/semantic_conventions.md maybe it's an issue in the AX doc page and this doesn't exists anywhere. Anyway it would be nice to have input messages for other thing than LLM (agents) for example Currently I'm using an LLM span kind for what is actually an agent (or chain) that processes an history but none of agent nor chain displays inputs.messages and llm.input_messages
