Skip to content

Conversation

@Dwij1704
Copy link
Member

📥 Pull Request

📘 Description

  • Introduced a helper function safe_json_serialize to safely serialize objects to JSON strings.
  • Updated span attribute assignments in AgentsDetailedExporter and AgentsInstrumentor to use this new function for input, output, and final_output attributes, ensuring proper handling of various object types.
  • Removed truncation for agent.instructions to allow full string representation.

🧪 Testing
Checked traces and spans via internal tools

@Dwij1704 Dwij1704 requested a review from tcdent March 14, 2025 22:39
@teocns
Copy link
Contributor

teocns commented Mar 14, 2025

we already have an AgentOpsJSONEncoder used in safe_serialize

https://github.com/AgentOps-AI/agentops/tree/main/agentops/helpers/serialization.py#L75

…tion in Agents SDK. Update references in agentops_agents_instrumentor to utilize the new function for handling inputs and outputs.
@areibman
Copy link
Contributor

Outdated

@areibman areibman closed this Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants