Skip to content

Conversation

LuizDMM
Copy link
Contributor

@LuizDMM LuizDMM commented Aug 6, 2025

Template Questions

  • I have added tests that cover my changes.
  • If adding a new instrumentation or changing an existing one, I've added screenshots from some observability platform showing the change.
  • PR name follows conventional commits format: feat(instrumentation): ... or fix(instrumentation): ....
  • (If applicable) I have updated the documentation accordingly.

Description

I left an empty file (I think it was left during some merges and moving code around) on my last PR about langchain and also forget to add back a @dont_throw I think I removed while testing, as pointed out by @ronensc (thank you man 😁), fixing those problems.


Important

Add @dont_throw to on_llm_end in callback_handler.py and remove empty event_handler.py.

  • Behavior:
    • Add @dont_throw decorator to on_llm_end in callback_handler.py to handle exceptions gracefully.
  • Misc:
    • Remove empty event_handler.py file.

This description was created by Ellipsis for 8313eb6. You can customize this summary. It will automatically update as commits are pushed.

Summary by CodeRabbit

  • Bug Fixes
    • Improved error handling in callback processing to prevent unexpected interruptions during model response completion, increasing overall stability.

Copy link

coderabbitai bot commented Aug 6, 2025

Walkthrough

The @dont_throw decorator was added to the on_llm_end method of the TraceloopCallbackHandler class in the callback handler module. No other modifications to method logic, parameters, or control flow were made.

Changes

Cohort / File(s) Change Summary
Decorator Addition to Callback Method
packages/opentelemetry-instrumentation-langchain/opentelemetry/instrumentation/langchain/callback_handler.py
Added @dont_throw decorator to on_llm_end method in TraceloopCallbackHandler class.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A decorator hops in, soft and spry,
Quieting errors that flutter by.
on_llm_end now gentle and light,
Silent fixes through day and night.
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8313eb6 and 15498d4.

📒 Files selected for processing (1)
  • packages/opentelemetry-instrumentation-langchain/opentelemetry/instrumentation/langchain/callback_handler.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/opentelemetry-instrumentation-langchain/opentelemetry/instrumentation/langchain/callback_handler.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Test Packages (3.10)
  • GitHub Check: Test Packages (3.12)
  • GitHub Check: Test Packages (3.11)
  • GitHub Check: Lint
  • GitHub Check: Build Packages (3.11)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 8313eb6 in 47 seconds. Click for details.
  • Reviewed 15 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/opentelemetry-instrumentation-langchain/opentelemetry/instrumentation/langchain/callback_handler.py:477
  • Draft comment:
    Good fix: adding @dont_throw here ensures on_llm_end handles errors consistently like other callbacks.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, as it praises the fix and explains what the change does without suggesting any improvements or asking for clarifications. It doesn't align with the rules for useful comments.
2. packages/opentelemetry-instrumentation-langchain/opentelemetry/instrumentation/langchain/event_handler.py:1
  • Draft comment:
    Removal of the empty event_handler.py file is appropriate.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_upao0cAzbh98A8w4

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@ronensc ronensc force-pushed the fix/langchain-fix-small-typos-on-last-pr branch from 8313eb6 to 15498d4 Compare August 12, 2025 14:31
@nirga nirga merged commit e99361c into traceloop:main Aug 12, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants