feat(perf-issues): Accept http.method as key for span data - #48155
Merged
narsaynorath merged 3 commits intoMay 3, 2023
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #48155 +/- ##
==========================================
- Coverage 80.89% 80.89% -0.01%
==========================================
Files 4771 4776 +5
Lines 201728 201831 +103
Branches 11542 11542
==========================================
+ Hits 163192 163275 +83
- Misses 38281 38301 +20
Partials 255 255
|
AbhiPrasad
reviewed
May 2, 2023
Co-authored-by: Abhijeet Prasad <aprasad@sentry.io>
AbhiPrasad
approved these changes
May 2, 2023
gggritso
approved these changes
May 2, 2023
gggritso
left a comment
Member
There was a problem hiding this comment.
I think this should be fine! The other detectors that rely on the HTTP method are ConsecutiveHTTPSpanDetector and NPlusOneAPICallsDetector, both of which use the span's description to get the method, instead of span data 👍🏻
k-fish
reviewed
May 2, 2023
| if request: | ||
| url = request.get("url", "") or "" | ||
| method = request.get("method", "") or "" | ||
| method = request.get("http.method", "") or request.get("method", "") or "" |
Member
There was a problem hiding this comment.
I'd leave a TODO w/ a cleanup note here that method can be removed likely in 6 month+ when the sdk has been more adopted.
narsaynorath
added a commit
that referenced
this pull request
May 2, 2023
I couldn't find anywhere in the frontend where we parsed out `method` from spans, so I've only updated the span data in tests. Backend PR: #48155
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Span data is renaming
method->http.methodso this PR checks for both in the backend. I was only able to find one perf issue that relied onmethod. Could there be other places I need to update to usehttp.method?SDK PR: getsentry/sentry-javascript#7990