Debian Codegraph @

google/logging/type/http_request.proto

raw
1 // Copyright 2025 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.logging.type;
18
19 import "google/protobuf/duration.proto";
20
21 option csharp_namespace = "Google.Cloud.Logging.Type";
22 option go_package = "google.golang.org/genproto/googleapis/logging/type;ltype";
23 option java_multiple_files = true;
24 option java_outer_classname = "HttpRequestProto";
25 option java_package = "com.google.logging.type";
26 option php_namespace = "Google\\Cloud\\Logging\\Type";
27 option ruby_package = "Google::Cloud::Logging::Type";
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.
32 message 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 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. This field can include port information. Examples:
60 // `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`.
61 string remote_ip = 7;
62
63 // The IP address (IPv4 or IPv6) of the origin server that the request was
64 // sent to. This field can include port information. Examples:
65 // `"192.168.1.1"`, `"10.0.0.1:80"`, `"FE80::0202:B3FF:FE1E:8329"`.
66 string server_ip = 13;
67
68 // The referer URL of the request, as defined in
69 // [HTTP/1.1 Header Field
70 // Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).
71 string referer = 8;
72
73 // The request processing latency on the server, from the time the request was
74 // received until the response was sent.
75 google.protobuf.Duration latency = 14;
76
77 // Whether or not a cache lookup was attempted.
78 bool cache_lookup = 11;
79
80 // Whether or not an entity was served from cache
81 // (with or without validation).
82 bool cache_hit = 9;
83
84 // Whether or not the response was validated with the origin server before
85 // being served from cache. This field is only meaningful if `cache_hit` is
86 // True.
87 bool cache_validated_with_origin_server = 10;
88
89 // The number of HTTP response bytes inserted into cache. Set only when a
90 // cache fill was attempted.
91 int64 cache_fill_bytes = 12;
92
93 // Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
94 string protocol = 15;
95 }