feat(logging): adding more fields to httpRequest (#2663)
diff --git a/logging/logging.go b/logging/logging.go
index 40b8393..7543bb0 100644
--- a/logging/logging.go
+++ b/logging/logging.go
@@ -687,6 +687,12 @@
// 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 @@
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)