Have instrumentation for ASGI middleware receive/send callbacks.#1673
Merged
antonpirker merged 15 commits intomasterfrom Oct 17, 2022
Merged
Conversation
… of github.com:getsentry/sentry-python into antonpirker/1664-fix-parent-span-in-fastapi-middleware
sl0thentr0py
requested changes
Oct 14, 2022
Member
sl0thentr0py
left a comment
There was a problem hiding this comment.
one question, and
in cases like these where we add some feature, can you attach a testing screenshot so that somebody who looks at the PR from the changelog can see clearly what changed?
Contributor
Author
Good idea! |
sl0thentr0py
approved these changes
Oct 17, 2022
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
To better visualize what is going on when ASGI middlewares are executed we added instrumentation for the
receiveandsendcallbacks.FIxes #1664
Before it seemed that the

db.redisspan originated in theAsyncExitStackMiddleware:Now you see that the

db.redisspan actually originates in asendcallback that is defined inMyCustomCounterMiddleware.__call__.<locals>.count_hits_to_url: