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.
Protobuf type 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.
Details
at line 119
__construct()
at line 130
string
getRequestMethod()
The request method. Examples: "GET"
, "HEAD"
, "PUT"
, "POST"
.
Generated from protobuf field string request_method = 1;
at line 141
setRequestMethod(string $var)
The request method. Examples: "GET"
, "HEAD"
, "PUT"
, "POST"
.
Generated from protobuf field string request_method = 1;
at line 155
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 168
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 181
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 193
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 206
int
getStatus()
The response code indicating the status of response.
Examples: 200, 404.
Generated from protobuf field int32 status = 4;
at line 218
setStatus(int $var)
The response code indicating the status of response.
Examples: 200, 404.
Generated from protobuf field int32 status = 4;
at line 231
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 243
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 256
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 268
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 281
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 293
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 306
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 318
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 331
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 343
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 356
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 368
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 380
bool
getCacheLookup()
Whether or not a cache lookup was attempted.
Generated from protobuf field bool cache_lookup = 11;
at line 391
setCacheLookup(bool $var)
Whether or not a cache lookup was attempted.
Generated from protobuf field bool cache_lookup = 11;
at line 404
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 416
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 430
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 443
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 456
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 468
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;