HttpRequest
class HttpRequest extends Message
A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message.
Generated from protobuf message google.logging.type.HttpRequest
Methods
No description
The request method. Examples: "GET"
, "HEAD"
, "PUT"
, "POST"
.
The request method. Examples: "GET"
, "HEAD"
, "PUT"
, "POST"
.
The scheme (http, https), the host name, the path and the query portion of the URL that was requested.
The scheme (http, https), the host name, the path and the query portion of the URL that was requested.
The size of the HTTP request message in bytes, including the request headers and the request body.
The size of the HTTP request message in bytes, including the request headers and the request body.
The response code indicating the status of response.
The response code indicating the status of response.
The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.
The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.
The user agent sent by the client. Example:
"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"
.
The user agent sent by the client. Example:
"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"
.
The IP address (IPv4 or IPv6) of the client that issued the HTTP
request. Examples: "192.168.1.1"
, "FE80::0202:B3FF:FE1E:8329"
.
The IP address (IPv4 or IPv6) of the client that issued the HTTP
request. Examples: "192.168.1.1"
, "FE80::0202:B3FF:FE1E:8329"
.
The IP address (IPv4 or IPv6) of the origin server that the request was sent to.
The IP address (IPv4 or IPv6) of the origin server that the request was sent to.
The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions.
The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions.
The request processing latency on the server, from the time the request was received until the response was sent.
The request processing latency on the server, from the time the request was received until the response was sent.
Whether or not a cache lookup was attempted.
Whether or not a cache lookup was attempted.
Whether or not an entity was served from cache (with or without validation).
Whether or not an entity was served from cache (with or without validation).
Whether or not the response was validated with the origin server before
being served from cache. This field is only meaningful if cache_hit
is
True.
Whether or not the response was validated with the origin server before
being served from cache. This field is only meaningful if cache_hit
is
True.
The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.
The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.
Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
Details
at line 125
__construct()
at line 136
string
getRequestMethod()
The request method. Examples: "GET"
, "HEAD"
, "PUT"
, "POST"
.
Generated from protobuf field string request_method = 1;
at line 148
$this
setRequestMethod(string $var)
The request method. Examples: "GET"
, "HEAD"
, "PUT"
, "POST"
.
Generated from protobuf field string request_method = 1;
at line 164
string
getRequestUrl()
The scheme (http, https), the host name, the path and the query portion of the URL that was requested.
Example: "http://example.com/some/info?color=red"
.
Generated from protobuf field string request_url = 2;
at line 178
$this
setRequestUrl(string $var)
The scheme (http, https), the host name, the path and the query portion of the URL that was requested.
Example: "http://example.com/some/info?color=red"
.
Generated from protobuf field string request_url = 2;
at line 193
int|string
getRequestSize()
The size of the HTTP request message in bytes, including the request headers and the request body.
Generated from protobuf field int64 request_size = 3;
at line 206
$this
setRequestSize(int|string $var)
The size of the HTTP request message in bytes, including the request headers and the request body.
Generated from protobuf field int64 request_size = 3;
at line 221
int
getStatus()
The response code indicating the status of response.
Examples: 200, 404.
Generated from protobuf field int32 status = 4;
at line 234
$this
setStatus(int $var)
The response code indicating the status of response.
Examples: 200, 404.
Generated from protobuf field int32 status = 4;
at line 249
int|string
getResponseSize()
The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.
Generated from protobuf field int64 response_size = 5;
at line 262
$this
setResponseSize(int|string $var)
The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.
Generated from protobuf field int64 response_size = 5;
at line 277
string
getUserAgent()
The user agent sent by the client. Example:
"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"
.
Generated from protobuf field string user_agent = 6;
at line 290
$this
setUserAgent(string $var)
The user agent sent by the client. Example:
"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"
.
Generated from protobuf field string user_agent = 6;
at line 305
string
getRemoteIp()
The IP address (IPv4 or IPv6) of the client that issued the HTTP
request. Examples: "192.168.1.1"
, "FE80::0202:B3FF:FE1E:8329"
.
Generated from protobuf field string remote_ip = 7;
at line 318
$this
setRemoteIp(string $var)
The IP address (IPv4 or IPv6) of the client that issued the HTTP
request. Examples: "192.168.1.1"
, "FE80::0202:B3FF:FE1E:8329"
.
Generated from protobuf field string remote_ip = 7;
at line 333
string
getServerIp()
The IP address (IPv4 or IPv6) of the origin server that the request was sent to.
Generated from protobuf field string server_ip = 13;
at line 346
$this
setServerIp(string $var)
The IP address (IPv4 or IPv6) of the origin server that the request was sent to.
Generated from protobuf field string server_ip = 13;
at line 361
string
getReferer()
The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions.
Generated from protobuf field string referer = 8;
at line 374
$this
setReferer(string $var)
The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions.
Generated from protobuf field string referer = 8;
at line 389
Duration
getLatency()
The request processing latency on the server, from the time the request was received until the response was sent.
Generated from protobuf field .google.protobuf.Duration latency = 14;
at line 402
$this
setLatency(Duration $var)
The request processing latency on the server, from the time the request was received until the response was sent.
Generated from protobuf field .google.protobuf.Duration latency = 14;
at line 416
bool
getCacheLookup()
Whether or not a cache lookup was attempted.
Generated from protobuf field bool cache_lookup = 11;
at line 428
$this
setCacheLookup(bool $var)
Whether or not a cache lookup was attempted.
Generated from protobuf field bool cache_lookup = 11;
at line 443
bool
getCacheHit()
Whether or not an entity was served from cache (with or without validation).
Generated from protobuf field bool cache_hit = 9;
at line 456
$this
setCacheHit(bool $var)
Whether or not an entity was served from cache (with or without validation).
Generated from protobuf field bool cache_hit = 9;
at line 472
bool
getCacheValidatedWithOriginServer()
Whether or not the response was validated with the origin server before
being served from cache. This field is only meaningful if cache_hit
is
True.
Generated from protobuf field bool cache_validated_with_origin_server = 10;
at line 486
$this
setCacheValidatedWithOriginServer(bool $var)
Whether or not the response was validated with the origin server before
being served from cache. This field is only meaningful if cache_hit
is
True.
Generated from protobuf field bool cache_validated_with_origin_server = 10;
at line 501
int|string
getCacheFillBytes()
The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.
Generated from protobuf field int64 cache_fill_bytes = 12;
at line 514
$this
setCacheFillBytes(int|string $var)
The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.
Generated from protobuf field int64 cache_fill_bytes = 12;
at line 528
string
getProtocol()
Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
Generated from protobuf field string protocol = 15;
at line 540
$this
setProtocol(string $var)
Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
Generated from protobuf field string protocol = 15;