Skip to content
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

Merged
merged 10 commits into from Aug 29, 2023
Merged

Set SDK Name According Framework being used #694

merged 10 commits into from Aug 29, 2023

Conversation

cleptric
Copy link
Member

@cleptric cleptric commented Aug 9, 2023

Closes #685

@cleptric cleptric self-assigned this Aug 9, 2023
@codecov
Copy link

codecov bot commented Aug 9, 2023

Codecov Report

Patch coverage: 78.37% and project coverage change: -0.08% ⚠️

Comparison is base (82a00ab) 80.78% compared to head (dcceaa4) 80.70%.

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              
Files Changed Coverage Δ
dsn.go 96.18% <ø> (ø)
echo/sentryecho.go 0.00% <0.00%> (ø)
iris/sentryiris.go 0.00% <0.00%> (ø)
martini/sentrymartini.go 0.00% <0.00%> (ø)
negroni/sentrynegroni.go 0.00% <0.00%> (ø)
sentry.go 29.31% <ø> (ø)
client.go 87.71% <100.00%> (+0.44%) ⬆️
fasthttp/sentryfasthttp.go 84.41% <100.00%> (+0.63%) ⬆️
gin/sentrygin.go 73.43% <100.00%> (+0.85%) ⬆️
http/sentryhttp.go 87.71% <100.00%> (+0.44%) ⬆️
... and 2 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

client.go Outdated Show resolved Hide resolved
@cleptric cleptric requested a review from tonyo August 9, 2023 10:28
@cleptric cleptric marked this pull request as ready for review August 9, 2023 10:28
@@ -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")
Copy link
Member Author

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.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tonyo tonyo self-requested a review August 14, 2023 11:08
dsn.go Outdated Show resolved Hide resolved
Co-authored-by: Anton Ovchinnikov <anton@tonyo.info>
@cleptric cleptric merged commit 5f86090 into master Aug 29, 2023
16 of 17 checks passed
@cleptric cleptric deleted the sdk-identifier branch August 29, 2023 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set SDK Name According Framework being used
2 participants