Conversation
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
|
Dude this is very well done! Just a couple questions and minor notes. |
…e unused EventHandler class. Update original_handler type to Any for flexibility.
…instrumentation. Introduce helper functions to handle various content types and extract attributes for telemetry. Update `get_message_request_attributes` to streamline message handling and support complex content structures.
… to replace old attribute keys with new `MessageAttributes` constants for correct indexing.
bboynton97
left a comment
There was a problem hiding this comment.
I'd really love to see unit testing on this because it seems pretty low lift. Other than that, GREAT job. this is very well extended, readable and does the job!! nice work @Dwij1704!
|
Tested against |
There was a problem hiding this comment.
A common error when running the notebooks is this -
(DEBUG) 🖇 AgentOps: [agentops.instrumentation.anthropic] Error creating simplified prompts: type object 'MessageAttributes' has no attribute 'LLM_PROMPTS'
(DEBUG) 🖇 AgentOps: [agentops.instrumentation.anthropic] Unrecognized return type: <class 'anthropic.Stream'>…uest_attributes`
|
|
dwij you the guy omg |

📥 Pull Request
📘 Description
Closes #912
Nuked previous implementation
messages.create(modern API) andcompletions.create(legacy API)Testing
Tested the instrumentation with the following script (Covers all scenarios)