Class HttpRequest (4.0.0)

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.

Inheritance

Object > HttpRequest

Namespace

Google.Cloud.Logging.Type

Assembly

Google.Cloud.Logging.Type.dll

Constructors

HttpRequest()

public HttpRequest()

HttpRequest(HttpRequest)

public HttpRequest(HttpRequest other)
Parameter
NameDescription
otherHttpRequest

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
TypeDescription
Int64

CacheHit

public bool CacheHit { get; set; }

Whether or not an entity was served from cache (with or without validation).

Property Value
TypeDescription
Boolean

CacheLookup

public bool CacheLookup { get; set; }

Whether or not a cache lookup was attempted.

Property Value
TypeDescription
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
TypeDescription
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
TypeDescription
Duration

Protocol

public string Protocol { get; set; }

Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"

Property Value
TypeDescription
String

Referer

public string Referer { get; set; }

The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions.

Property Value
TypeDescription
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: &quot;192.168.1.1&quot;, &quot;10.0.0.1:80&quot;, &quot;FE80::0202:B3FF:FE1E:8329&quot;.

Property Value
TypeDescription
String

RequestMethod

public string RequestMethod { get; set; }

The request method. Examples: &quot;GET&quot;, &quot;HEAD&quot;, &quot;PUT&quot;, &quot;POST&quot;.

Property Value
TypeDescription
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
TypeDescription
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: &quot;http://example.com/some/info?color=red&quot;.

Property Value
TypeDescription
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
TypeDescription
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: &quot;192.168.1.1&quot;, &quot;10.0.0.1:80&quot;, &quot;FE80::0202:B3FF:FE1E:8329&quot;.

Property Value
TypeDescription
String

Status

public int Status { get; set; }

The response code indicating the status of response. Examples: 200, 404.

Property Value
TypeDescription
Int32

UserAgent

public string UserAgent { get; set; }

The user agent sent by the client. Example: &quot;Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)&quot;.

Property Value
TypeDescription
String