Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1094 +/- ##
==========================================
- Coverage 86.97% 86.64% -0.33%
==========================================
Files 57 61 +4
Lines 6426 6966 +540
==========================================
+ Hits 5589 6036 +447
- Misses 681 745 +64
- Partials 156 185 +29 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3ce9dee to
4228142
Compare
sl0thentr0py
left a comment
There was a problem hiding this comment.
ideally we'd also abstract the older event types as envelope items, but I'll leave it upto you if you want to do that now or separately later
lcian
left a comment
There was a problem hiding this comment.
Left some mostly minor comments, looks good overall. Haven't looked at the tests yet.
| // PublicKey | ||
| publicKey := parsedURL.User.Username() | ||
| if publicKey == "" { | ||
| return nil, &DsnParseError{"empty username"} |
There was a problem hiding this comment.
username is confusing, users only understand "public key" and "project id"
| return nil, &DsnParseError{"empty username"} | |
| return nil, &DsnParseError{"empty public key"} |
| if dsn.secretKey != "" { | ||
| url += fmt.Sprintf(":%s", dsn.secretKey) | ||
| } | ||
| url += fmt.Sprintf("@%s", dsn.host) |
There was a problem hiding this comment.
Annoying request, but: What about self-hosted users that uses private IPv6 address on their DSN? 😀
There was a problem hiding this comment.
Why is this problematic for IPv6?
There was a problem hiding this comment.
For IPv6, you would need to enclose it within [] brackets. Or maybe just create a test case for this one.
There was a problem hiding this comment.
Let's have a look at this on another PR, don't want to introduce another behavioral change here.
Description
Create the new transport that accepts envelopes and not events. For now only the implementation for the new transport is added, without deprecating the old one. The PR also includes some misc changes:
Issues
Note
Introduce envelope-first Sync/Async HTTP transports, centralize DSN and envelope types under internal/protocol, and adapt SDK to use them with minimal API surface changes.
internal/httptransports:AsyncTransportandSyncTransportthat sendprotocol.Envelopes, with queueing, flush/close, rate limiting, proxy/TLS config, headers, and keep-alive handling.internal/protocol:Dsn,Envelope(+ items, header),SdkInfo, and interfaces (EnvelopeConvertible,TelemetryTransport).DsnandDsnParseErrorin top-levelsentry;NewDsndelegates to protocol;RequestHeaders()uses SDK version; minor typo fix in comment.Event.ToEnvelope/ToEnvelopeWithTime; include DSC trace info and attachments; fallback JSON marshal path preserved.DynamicSamplingContextandtransport.goto use DSN getters (GetPublicKey, etc.) and scheme constants from protocol inNewRequest.Written by Cursor Bugbot for commit 1ed184b. This will update automatically on new commits. Configure here.