tuns
created pr with
38.1
added 38.2
1: 55cba32 = 1: 55cba32 chore(analytics): send content-type to `metric-drain`
-: ------- > 2: 334a6dc chore: check for resp
added 38.3
1: 55cba32 < -: ------- chore(analytics): send content-type to `metric-drain`
-: ------- > 1:
2: 334a6dc < -: ------- chore: check for resp
added 38.4
1: < -: -------
-: ------- > 1: ea8a742 chore(analytics): send content-type to `metric-drain`
cmds
checkout latest patchset:
ssh pr.pico.sh print 38 | git am -3checkout any patchset in a patch request:
ssh pr.pico.sh print 38.[rev] | git am -3add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add 38
Patchset
38.2
chore: check for resp
Eric Bower
2024-11-28T03:36:08ZSemantic diff summary
0 added,
1 modified,
0 signature changed,
0 removed
across 1 analyzed file
+12
-9
httpmuxer/httpmuxer.go
#
| ... | ... | @@ -129,15 +129,18 @@ func Start(state *utils.State) { | |
| 129 | 129 | slog.Info(logLine, "user", user, "userId", userId) | |
| 130 | 130 | ||
| 131 | 131 | visit := &utils.MetricDrainVisit{ | |
| 132 | - | Namespace: "tuns", | |
| 133 | - | UserID: userId, | |
| 134 | - | Host: param.Request.Host, | |
| 135 | - | IpAddress: param.ClientIP, | |
| 136 | - | Status: param.StatusCode, | |
| 137 | - | Path: originalURI, | |
| 138 | - | UserAgent: param.Request.UserAgent(), | |
| 139 | - | Referer: param.Request.Referer(), | |
| 140 | - | ContentType: param.Request.Response.Header.Get("Content-Type"), | |
| 132 | + | Namespace: "tuns", | |
| 133 | + | UserID: userId, | |
| 134 | + | Host: param.Request.Host, | |
| 135 | + | IpAddress: param.ClientIP, | |
| 136 | + | Status: param.StatusCode, | |
| 137 | + | Path: originalURI, | |
| 138 | + | UserAgent: param.Request.UserAgent(), | |
| 139 | + | Referer: param.Request.Referer(), | |
| 140 | + | } | |
| 141 | + | ||
| 142 | + | if param.Request.Response != nil { | |
| 143 | + | visit.ContentType = param.Request.Response.Header.Get("Content-Type") | |
| 141 | 144 | } | |
| 142 | 145 | ||
| 143 | 146 | select { |