Logs
Patchsets
Range Diff ↕ rd-82
1: 55cba32 = 1: 55cba32 chore(analytics): send content-type to `metric-drain`
-: ------- > 2: 334a6dc chore: check for resp
Range Diff ↕ rd-83
1: 55cba32 < -: ------- chore(analytics): send content-type to `metric-drain`
-: ------- > 1:
2: 334a6dc < -: ------- chore: check for resp
Range Diff ↕ rd-84
1: ! 1: ea8a742 chore(analytics): send content-type to `metric-drain`
Range-diff rd-82
- title
- chore(analytics): send content-type to `metric-drain`
- description
-
Patch equal - old #1
55cba32- new #1
55cba32
- title
- chore: check for resp
- description
-
Patch added - old #0
(none)- new #2
334a6dc
1: 55cba32 = 1: 55cba32 chore(analytics): send content-type to `metric-drain`
-: ------- > 2: 334a6dc chore: check for resp
old
new
old:
httpmuxer/httpmuxer.go
new:httpmuxer/httpmuxer.go
slog.Info(logLine, "user", user, "userId", userId) visit := &utils.MetricDrainVisit{ - Namespace: "tuns", - UserID: userId, - Host: param.Request.Host, - IpAddress: param.ClientIP, - Status: param.StatusCode, - Path: originalURI, - UserAgent: param.Request.UserAgent(), - Referer: param.Request.Referer(), - ContentType: param.Request.Response.Header.Get("Content-Type"), + Namespace: "tuns", + UserID: userId, + Host: param.Request.Host, + IpAddress: param.ClientIP, + Status: param.StatusCode, + Path: originalURI, + UserAgent: param.Request.UserAgent(), + Referer: param.Request.Referer(), + } + + if param.Request.Response != nil { + visit.ContentType = param.Request.Response.Header.Get("Content-Type") } select {