-
-
Notifications
You must be signed in to change notification settings - Fork 512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implement LLM monitoring with langchainrb integration #2411
base: master
Are you sure you want to change the base?
Conversation
@sl0thentr0py I'm not too familiar Ruby or with how to get it completely up and running with |
ty @monotykamary I will review this in a few days and see how best to package the new integration. |
This looks like an awesome addition to the sentry ruby ecosystem, please do net let it |
@rwojsznis we're not letting that to happen 🙃 @monotykamary thanks again for kick-starting this effort - are you still interested in working on this feature? |
I'm down for a redemption arc 🤘 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm down for a redemption arc 🤘
@monotykamary I'm taking this as a...yes? 🙃 If you'd like to continue, the first thing to do as the next step would be to add some basic tests. Please let me know if I could help you with this!
|
||
def summarize(...) | ||
wrap_with_sentry("chat_completions") { super(...) } | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and in the previous methods we shouldn't be using ...
syntax because unfortunately it's not gonna work with older Rubies that we still need to support. If the original methods have the same signature in case of all backends, I would suggest using the exact same signature and passing arguments to super
.
Description
This PR introduces a crude implementation of LLM Monitoring with LangChainrb integration to the Sentry Ruby SDK. The changes include:
monitoring.rb
file in thesentry-ruby/lib/sentry/ai/
directory, which implements AI monitoring functionality.langchain.rb
file in bothsentry-ruby/lib/sentry/
andsentry-ruby/lib/sentry/ai/
directories, providing LangChain integration for the Sentry Ruby SDK.span.rb
andtransaction.rb
to support these new features.These changes enhance Sentry's capabilities in monitoring and integrating with AI-related technologies, particularly focusing on LangChain integration.
Current problems
LLM Monitoring
page, but most, if not all the span data are listed in the implementation.Related Issues/PRs
Refactoring
Changelog Entry
Added
sentry-ruby/lib/sentry/ai/monitoring.rb
)sentry-ruby/lib/sentry/langchain.rb
andsentry-ruby/lib/sentry/ai/langchain.rb
)Basic Testing: