-
Notifications
You must be signed in to change notification settings - Fork 760
Rewrite FastAPI instrumentor middleware stack to be failsafe #3664
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
Open
outergod
wants to merge
24
commits into
open-telemetry:main
Choose a base branch
from
outergod:fix/GH-3642-fastapi-exceptions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+314
−35
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
50120ce
rewrite FastAPIInstrumentor:build_middleware_stack to become failsafe
outergod 8a1a39e
add test cases for FastAPI failsafe handling
outergod 2150e5c
add CHANGELOG entry
outergod 2faf005
remove unused import
outergod 5665a0a
[lint] don't return from failsafe wrapper
outergod 425a7f3
[lint] allow broad exceptions
outergod 6c48703
[lint] more allowing
outergod 55e9c43
record FastAPI hook exceptions in active span
outergod a7a4949
remove comment
outergod 5632d1b
properly deal with hooks not being set
outergod 0203e4b
add custom FastAPI exception recording
outergod 4c17f00
move failsafe hook handling down to OpenTelemetryMiddleware
outergod 56139a3
shut up pylint
outergod 843d8c7
optimize failsafe to check for `None` only once
outergod c2c326e
remove confusing comment and simplify wrapper logic
outergod 3a19941
add clarifying comment
outergod 4e29a76
test proper exception / status code recording
outergod 1902548
add HTTP status code check
outergod fce5164
test HTTP status on the exception recording span
outergod 3cc31d0
improve test by removing TypeError
outergod 217763b
rectify comment/explanation on inner middleware for exception handling
outergod b4cdc0e
minor typo
outergod 8fe25f3
Merge remote-tracking branch 'upstream/main' into fix/GH-3642-fastapi…
outergod 2739fbb
move ExceptionHandlingMiddleware as the outermost inner middleware
outergod File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.