feat(logging): adding more fields to httpRequest
@@ -687,6 +687,12 @@ type HTTPRequest struct {
// validated with the origin server before being served from cache. This
// field is only meaningful if CacheHit is true.
CacheValidatedWithOriginServer bool
+
+ // CacheFillBytes is the number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.
+ CacheFillBytes int64
+
+ // CacheLookup tells whether or not a cache lookup was attempted.
+ CacheLookup bool
}
func fromHTTPRequest(r *HTTPRequest) *logtypepb.HttpRequest {
@@ -710,6 +716,9 @@ func fromHTTPRequest(r *HTTPRequest) *logtypepb.HttpRequest {
Referer: r.Request.Referer(),
CacheHit: r.CacheHit,
CacheValidatedWithOriginServer: r.CacheValidatedWithOriginServer,
+ Protocol: r.Request.Proto,
+ CacheFillBytes: r.CacheFillBytes,
+ CacheLookup: r.CacheLookup,
}
if r.Latency != 0 {
pb.Latency = ptypes.DurationProto(r.Latency)
