-
Notifications
You must be signed in to change notification settings - Fork 219
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
Set SDK Name According Framework being used #694
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #694 +/- ##
==========================================
- Coverage 80.78% 80.70% -0.08%
==========================================
Files 45 45
Lines 4574 4598 +24
==========================================
+ Hits 3695 3711 +16
- Misses 742 750 +8
Partials 137 137
☔ View full report in Codecov by Sentry. |
@@ -209,7 +209,8 @@ func envelopeFromBody(event *Event, dsn *Dsn, sentAt time.Time, body json.RawMes | |||
func getRequestFromEvent(event *Event, dsn *Dsn) (r *http.Request, err error) { | |||
defer func() { | |||
if r != nil { | |||
r.Header.Set("User-Agent", userAgent) | |||
r.Header.Set("User-Agent", fmt.Sprintf("%s/%s", event.Sdk.Name, event.Sdk.Version)) | |||
r.Header.Set("Content-Type", "application/x-sentry-envelope") |
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.
dsn.go
Outdated
@@ -197,6 +197,7 @@ func (dsn Dsn) GetAPIURL() *url.URL { | |||
} | |||
|
|||
// RequestHeaders returns all the necessary headers that have to be used in the transport. | |||
// Deprecated: To be removed in 0.25.0. Requests to /envelope are authenticated using the DSN in the envelope header itself. |
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.
# Conflicts: # client_test.go
Co-authored-by: Anton Ovchinnikov <[email protected]>
Closes #685