tuns

created pr with 38.1 on 2024-11-28T03:02:21Z · by c8ef7d19
added 38.2 on 2024-11-28T03:36:31Z · by c8ef7d19
1: 55cba32 = 1: 55cba32 chore(analytics): send content-type to `metric-drain`
-: ------- > 2: 334a6dc chore: check for resp
added 38.3 on 2024-11-28T14:08:25Z · by c8ef7d19
1: 55cba32 < -: ------- chore(analytics): send content-type to `metric-drain`
-: ------- > 1:
2: 334a6dc < -: ------- chore: check for resp
added 38.4 on 2024-11-28T14:09:17Z · by c8ef7d19
1: < -: -------
-: ------- > 1: ea8a742 chore(analytics): send content-type to `metric-drain`
cmds
checkout latest patchset:
ssh pr.pico.sh print 38 | git am -3
checkout any patchset in a patch request:
ssh pr.pico.sh print 38.[rev] | git am -3
add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add 38

Patchset 38.2 on 2024-11-28T03:36:31Z · commit 334a6dc

+12 -9 httpmuxer/httpmuxer.go #
......@@ -129,15 +129,18 @@ func Start(state *utils.State) {
129129 slog.Info(logLine, "user", user, "userId", userId)
130130
131131 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")
141144 }
142145
143146 select {
Back to top