Skip to content

Incorrect processing of tool call result for observability #3041

@Yev4all

Description

@Yev4all

Use case: create observability/span information with functional call details

In case of OBSERVABILITY_SETTINGS.SENSITIVE_DATA_ENABLED setting framework tries to set value of gen_ai.tool.call.result span attribute. Framework makes assumption that all results are json formattable which is not correct in case of TextContent result type.
That processing creates exception which provides incorrect value.

gen_ai.tool.call.result": "non-serializable result"

In a current implementation errors occur in _tools.py

Please let me know if any additional information is required to repro such a behavior

Thank you

YK

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions