fix(otel): Better handling for HTTP span attributes#610
Merged
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #610 +/- ##
==========================================
+ Coverage 78.91% 79.92% +1.01%
==========================================
Files 38 38
Lines 3851 3861 +10
==========================================
+ Hits 3039 3086 +47
+ Misses 710 669 -41
- Partials 102 106 +4
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
tonyo
commented
Mar 29, 2023
| // This is normally the HTTP-client case | ||
| if parsedUrl, err := url.Parse(httpUrl); err == nil { | ||
| // Do not include the query and fragment parts | ||
| httpPath = fmt.Sprintf("%s://%s%s", parsedUrl.Scheme, parsedUrl.Host, parsedUrl.Path) |
Contributor
Author
There was a problem hiding this comment.
After chatting with @antonpirker I decided to drop the query/fragment parts, just to be on a bit safer side in terms of both cardinality and PII.
antonpirker
approved these changes
Mar 30, 2023
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.
This fixes a few cases when span description for HTTP spans was super basic (e.g. for HTTP client spans).
So what looked like this:
https://sentry-sdks.sentry.io/performance/otel-demo-checkoutservice:64da25426e624ac89e9dc0789207100d/?environment=production-dev&project=4504524774047744&query=&referrer=performance-transaction-summary&statsPeriod=1h&transaction=hipstershop.CheckoutService%2FPlaceOrder&unselectedSeries=p100%28%29
...is now this:
https://sentry-sdks.sentry.io/performance/otel-demo-checkoutservice:366ed120baf0449c8b9af96b89482692/?environment=staging-dev&project=4504524774047744&query=&statsPeriod=1h&transaction=hipstershop.CheckoutService%2FPlaceOrder#span-6e440558257cee22
Fixes #557, part of getsentry/team-webplatform-meta#32