Skip to content

[Observability] Add observability support for function calling.Β #1924

@Cirilla-zmh

Description

@Cirilla-zmh

Expected Behavior

The observability of Spring AI is quite impressive, and it has helped us resolve numerous issues. Thank you so much!

However, as a crucial component of the Spring AI, function callings lack support for observability. In fact, our agent application contains a significant number of function calling invocations, and we would like to see them as spans in the trace. This visibility would help us understand how the LLM organizes these function calls and allow us to see the input and output during the invocation process (it's important data for evaluate LLM correctness).

We have conducted some preliminary research and believe that adding observability instrumentation to the org.springframework.ai.chat.model.AbstractToolCallSupport#executeFunctions method would be a good solution. If you have plans to support this but are currently not available, we would be more than happy to contribute.

Current Behavior

Function callings lack support for observability.

Context

No more context. If you have more you need to know, feel free to ask. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions