feat(langchain): Support `BaseCallbackManager`
While implementing #4479, I noticed that our Langchain integration lacks support for the local_callbacks having type BaseCallbackManager, which according to the type hint is possible.
This change adds support for this case.
Thank you for contributing to sentry-python! Please add tests to validate your changes, and lint your code using tox -e linters.
Running the test suite on your PR might require maintainer approval.
Codecov Report
Attention: Patch coverage is 70.00000% with 6 lines in your changes missing coverage. Please review.
Project coverage is 80.68%. Comparing base (
c31ba06) to head (048c148). Report is 1 commits behind head on master.
:white_check_mark: All tests successful. No failed tests found.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| sentry_sdk/integrations/langchain.py | 70.00% | 3 Missing and 3 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #4486 +/- ##
==========================================
- Coverage 80.76% 80.68% -0.08%
==========================================
Files 156 156
Lines 16483 16496 +13
Branches 2801 2806 +5
==========================================
- Hits 13312 13310 -2
- Misses 2290 2303 +13
- Partials 881 883 +2
| Files with missing lines | Coverage Δ | |
|---|---|---|
| sentry_sdk/integrations/langchain.py | 70.90% <70.00%> (+0.77%) |
:arrow_up: |