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