Skip to content

Conversation

renaudcepre
Copy link

No description provided.

- Introduced the `record_handled_exceptions` parameter allowing HTTP exceptions to be conditionally excluded.
- Updated exception handling logic to filter `StarletteHTTPException` when `record_handled_exceptions` is `False`.
- Added tests to ensure both backward compatibility and new behavior scenarios.
- Updated FastAPI integration to detect and exclude exceptions with registered handlers when `record_handled_exceptions=False`.
- Enhanced `_should_record_exception` logic to distinguish between handled and unhandled exceptions.
- Updated tests to validate new behavior for both handled and unhandled custom exceptions.
Copy link

codecov bot commented Sep 2, 2025

Codecov Report

❌ Patch coverage is 96.55172% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
tests/otel_integrations/test_fastapi.py 95.69% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

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.

1 participant