Skip to content

Commit 6eaa67a

Browse files
authored
Improve Sentry logging (#36)
1 parent 82a27a7 commit 6eaa67a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

network/middleware/sentry.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,17 @@ func SetupSentry(dsn string) error {
2626
return nil
2727
}
2828

29-
var SentryErrorHandler = func(res *http.Response, uri string) error {
29+
var SentryErrorHandler = func(res *http.Response, url string) error {
3030
statusCode := res.StatusCode
3131
//Improve ways to identify if worth logging the error
3232
if statusCode != http.StatusOK && statusCode != http.StatusNotFound {
3333
log.WithFields(log.Fields{
3434
"tags": raven.Tags{
3535
{Key: "status_code", Value: strconv.Itoa(res.StatusCode)},
3636
{Key: "host", Value: res.Request.URL.Host},
37-
{Key: "url", Value: uri},
37+
{Key: "path", Value: res.Request.URL.Path},
3838
},
39+
"url": url,
3940
"fingerprint": []string{"client_errors"},
4041
}).Error("Client Errors")
4142
}

0 commit comments

Comments
 (0)