public sealed class HttpRequest : IMessage<HttpRequest>, IEquatable<HttpRequest>, IDeepCloneable<HttpRequest>, IBufferMessage, IMessage
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.
Implements
IMessage<HttpRequest>, IEquatable<HttpRequest>, IDeepCloneable<HttpRequest>, IBufferMessage, IMessageNamespace
Google.Cloud.Logging.TypeAssembly
Google.Cloud.Logging.Type.dll
Constructors
HttpRequest()
public HttpRequest()
HttpRequest(HttpRequest)
public HttpRequest(HttpRequest other)
Parameter | |
---|---|
Name | Description |
other | HttpRequest |
Properties
CacheFillBytes
public long CacheFillBytes { get; set; }
The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.
Property Value | |
---|---|
Type | Description |
Int64 |
CacheHit
public bool CacheHit { get; set; }
Whether or not an entity was served from cache (with or without validation).
Property Value | |
---|---|
Type | Description |
Boolean |
CacheLookup
public bool CacheLookup { get; set; }
Whether or not a cache lookup was attempted.
Property Value | |
---|---|
Type | Description |
Boolean |
CacheValidatedWithOriginServer
public bool CacheValidatedWithOriginServer { get; set; }
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.
Property Value | |
---|---|
Type | Description |
Boolean |
Latency
public Duration Latency { get; set; }
The request processing latency on the server, from the time the request was received until the response was sent.
Property Value | |
---|---|
Type | Description |
Duration |
Protocol
public string Protocol { get; set; }
Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
Property Value | |
---|---|
Type | Description |
String |
Referer
public string Referer { get; set; }
The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions.
Property Value | |
---|---|
Type | Description |
String |
RemoteIp
public string RemoteIp { get; set; }
The IP address (IPv4 or IPv6) of the client that issued the HTTP
request. This field can include port information. Examples:
"192.168.1.1"
, "10.0.0.1:80"
, "FE80::0202:B3FF:FE1E:8329"
.
Property Value | |
---|---|
Type | Description |
String |
RequestMethod
public string RequestMethod { get; set; }
The request method. Examples: "GET"
, "HEAD"
, "PUT"
, "POST"
.
Property Value | |
---|---|
Type | Description |
String |
RequestSize
public long RequestSize { get; set; }
The size of the HTTP request message in bytes, including the request headers and the request body.
Property Value | |
---|---|
Type | Description |
Int64 |
RequestUrl
public string RequestUrl { get; set; }
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"
.
Property Value | |
---|---|
Type | Description |
String |
ResponseSize
public long ResponseSize { get; set; }
The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.
Property Value | |
---|---|
Type | Description |
Int64 |
ServerIp
public string ServerIp { get; set; }
The IP address (IPv4 or IPv6) of the origin server that the request was
sent to. This field can include port information. Examples:
"192.168.1.1"
, "10.0.0.1:80"
, "FE80::0202:B3FF:FE1E:8329"
.
Property Value | |
---|---|
Type | Description |
String |
Status
public int Status { get; set; }
The response code indicating the status of response. Examples: 200, 404.
Property Value | |
---|---|
Type | Description |
Int32 |
UserAgent
public string UserAgent { get; set; }
The user agent sent by the client. Example:
"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET
CLR 1.0.3705)"
.
Property Value | |
---|---|
Type | Description |
String |