|
| 1 | +// Copyright 2020 Google LLC |
| 2 | +// |
| 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 |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 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. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.api.servicecontrol.v1; |
| 18 | + |
| 19 | +import "google/protobuf/duration.proto"; |
| 20 | + |
| 21 | +option go_package = "google.golang.org/genproto/googleapis/api/servicecontrol/v1;servicecontrol"; |
| 22 | +option java_multiple_files = true; |
| 23 | +option java_outer_classname = "HttpRequestProto"; |
| 24 | +option java_package = "com.google.api.servicecontrol.v1"; |
| 25 | + |
| 26 | +// A common proto for logging HTTP requests. Only contains semantics |
| 27 | +// defined by the HTTP specification. Product-specific logging |
| 28 | +// information MUST be defined in a separate message. |
| 29 | +message HttpRequest { |
| 30 | + // The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. |
| 31 | + string request_method = 1; |
| 32 | + |
| 33 | + // The scheme (http, https), the host name, the path, and the query |
| 34 | + // portion of the URL that was requested. |
| 35 | + // Example: `"http://example.com/some/info?color=red"`. |
| 36 | + string request_url = 2; |
| 37 | + |
| 38 | + // The size of the HTTP request message in bytes, including the request |
| 39 | + // headers and the request body. |
| 40 | + int64 request_size = 3; |
| 41 | + |
| 42 | + // The response code indicating the status of the response. |
| 43 | + // Examples: 200, 404. |
| 44 | + int32 status = 4; |
| 45 | + |
| 46 | + // The size of the HTTP response message sent back to the client, in bytes, |
| 47 | + // including the response headers and the response body. |
| 48 | + int64 response_size = 5; |
| 49 | + |
| 50 | + // The user agent sent by the client. Example: |
| 51 | + // `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET |
| 52 | + // CLR 1.0.3705)"`. |
| 53 | + string user_agent = 6; |
| 54 | + |
| 55 | + // The IP address (IPv4 or IPv6) of the client that issued the HTTP |
| 56 | + // request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`. |
| 57 | + string remote_ip = 7; |
| 58 | + |
| 59 | + // The IP address (IPv4 or IPv6) of the origin server that the request was |
| 60 | + // sent to. |
| 61 | + string server_ip = 13; |
| 62 | + |
| 63 | + // The referer URL of the request, as defined in |
| 64 | + // [HTTP/1.1 Header Field |
| 65 | + // Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). |
| 66 | + string referer = 8; |
| 67 | + |
| 68 | + // The request processing latency on the server, from the time the request was |
| 69 | + // received until the response was sent. |
| 70 | + google.protobuf.Duration latency = 14; |
| 71 | + |
| 72 | + // Whether or not a cache lookup was attempted. |
| 73 | + bool cache_lookup = 11; |
| 74 | + |
| 75 | + // Whether or not an entity was served from cache |
| 76 | + // (with or without validation). |
| 77 | + bool cache_hit = 9; |
| 78 | + |
| 79 | + // Whether or not the response was validated with the origin server before |
| 80 | + // being served from cache. This field is only meaningful if `cache_hit` is |
| 81 | + // True. |
| 82 | + bool cache_validated_with_origin_server = 10; |
| 83 | + |
| 84 | + // The number of HTTP response bytes inserted into cache. Set only when a |
| 85 | + // cache fill was attempted. |
| 86 | + int64 cache_fill_bytes = 12; |
| 87 | + |
| 88 | + // Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket" |
| 89 | + string protocol = 15; |
| 90 | +} |
0 commit comments