-
Notifications
You must be signed in to change notification settings - Fork 213
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
fix(otel): Better handling for HTTP span attributes #610
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. |
// 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) |
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.
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.
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.
Nice, thanks Anton!
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