1 // Copyright 2018 Google LLC.
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
18 package google.logging.type;
20 import "google/api/annotations.proto";
21 import "google/protobuf/duration.proto";
23 option csharp_namespace = "Google.Cloud.Logging.Type";
24 option go_package = "google.golang.org/genproto/googleapis/logging/type;ltype";
25 option java_multiple_files = true;
26 option java_outer_classname = "HttpRequestProto";
27 option java_package = "com.google.logging.type";
28 option php_namespace = "Google\\Cloud\\Logging\\Type";
30 // A common proto for logging HTTP requests. Only contains semantics
31 // defined by the HTTP specification. Product-specific logging
32 // information MUST be defined in a separate message.
34 // The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
35 string request_method = 1;
37 // The scheme (http, https), the host name, the path and the query
38 // portion of the URL that was requested.
39 // Example: `"http://example.com/some/info?color=red"`.
40 string request_url = 2;
42 // The size of the HTTP request message in bytes, including the request
43 // headers and the request body.
44 int64 request_size = 3;
46 // The response code indicating the status of response.
47 // Examples: 200, 404.
50 // The size of the HTTP response message sent back to the client, in bytes,
51 // including the response headers and the response body.
52 int64 response_size = 5;
54 // The user agent sent by the client. Example:
55 // `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET
57 string user_agent = 6;
59 // The IP address (IPv4 or IPv6) of the client that issued the HTTP
60 // request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`.
63 // The IP address (IPv4 or IPv6) of the origin server that the request was
65 string server_ip = 13;
67 // The referer URL of the request, as defined in
68 // [HTTP/1.1 Header Field
69 // Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
72 // The request processing latency on the server, from the time the request was
73 // received until the response was sent.
74 google.protobuf.Duration latency = 14;
76 // Whether or not a cache lookup was attempted.
77 bool cache_lookup = 11;
79 // Whether or not an entity was served from cache
80 // (with or without validation).
83 // Whether or not the response was validated with the origin server before
84 // being served from cache. This field is only meaningful if `cache_hit` is
86 bool cache_validated_with_origin_server = 10;
88 // The number of HTTP response bytes inserted into cache. Set only when a
89 // cache fill was attempted.
90 int64 cache_fill_bytes = 12;
92 // Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"