LogRecord Class

  • java.lang.Object
    • com.microsoft.azure.storage.analytics.LogRecord

public class LogRecord

Represents a Storage Analytics Log record entry.

Field Summary

Modifier and Type Field and Description
final SimpleDateFormat LAST_MODIFIED_TIME_FORMAT

Holds the date format for the LastModifiedTime field.

final SimpleDateFormat REQUEST_START_TIME_FORMAT

Holds the date format for the RequestStartTime field.

Constructor Summary

Constructor Description
LogRecord()

Initializes a new instance of the LogRecord class.

LogRecord(LogRecordStreamReader reader)

Initializes a new instance of the LogRecord class using a LogRecordStreamReader to populate.

Method Summary

Modifier and Type Method and Description
String getAuthenticationType()

Gets whether the request was authenticated, anonymous, or used Shared Access Signature (SAS).

String getClientRequestId()

Gets the x-ms-client-request-id header value included in the request.

String getConditionsUsed()

Gets conditions used, as an encoded string semicolon-separated list in the form of ConditionName=value .

Integer getEndToEndLatencyInMS()

Gets the total time in milliseconds to perform the requested operation, including the time to read the incoming request and send the response to the requester.

String getETagIdentifier()

Gets the ETag identifier for the returned object as an encoded string.

String getHttpStatusCode()

Gets the HTTP status code for the request. If the request is interrupted, this value may be set to Unknown.

Date getLastModifiedTime()

Gets the Last Modified Time (LMT) for the returned object as an encoded string. This field is null for operations that can return multiple objects.

Integer getOperationCount()

Gets the number of each logged operation for a request, using an index of zero. Some requests require more than one operation, such as Copy Blob, though most perform just one operation.

String getOperationType()

Gets the type of REST operation performed.

String getOwnerAccountName()

Gets the account name of the service owner.

String getReferrerHeader()

Gets the Referrer header value as an encoded string.

Long getRequestContentLength()

Gets the value of the Content-Length header for the request sent to the storage service. If the request was successful, this value is equal to request-packet-size. If a request is unsuccessful, this value may not be equal to request-packet-size, or it may be null.

String getRequestedObjectKey()

Gets the key of the requested object as an encoded string. This field will always use the account name, even if a custom domain name has been configured.

String getRequesterAccountName()

Gets the account name making the request, if the request is authenticated. This field will be null for anonymous and SAS requests.

String getRequesterIPAddress()

Gets the IP address and port of the requester.

Long getRequestHeaderSize()

Gets the size of the request header, in bytes. If a request is unsuccessful, this value may be null.

UUID getRequestIdHeader()

Gets the request ID assigned by the storage service. This is equivalent to the value of the x-ms-request-id header.

String getRequestMD5()

Gets the value of either the Content-MD5 header or the x-ms-content-md5 header in the request as an encoded string. The MD5 hash value specified in this field represents the content in the request. This field can be null.

Long getRequestPacketSize()

Gets the size of the request packets read by the storage service, in bytes. If a request is unsuccessful, this value may be null.

Date getRequestStartTime()

Gets the time in UTC when the request was received by Storage Analytics.

String getRequestStatus()

Gets the status of the requested operation.

URI getRequestUrl()

Gets the complete URL of the request.

String getRequestVersionHeader()

Gets the storage service version specified when the request was made. This is equivalent to the value of the x-ms-version header.

Long getResponseHeaderSize()

Gets the size of the response header, in bytes. If a request is unsuccessful, this value may be null.

Long getResponsePacketSize()

Gets the size of the response packets written by the storage service, in bytes. If a request is unsuccessful, this value may be null.

Integer getServerLatencyInMS()

Gets the total time in milliseconds to perform the requested operation. This value does not include network latency (the time to read the incoming request and send the response to the requester).

String getServerMD5()

Gets the value of the MD5 hash calculated by the storage service as an encoded string.

String getServiceType()

Gets the requested storage service: blob, table, or queue.

String getUserAgentHeader()

Gets the User-Agent header value as an encoded string.

String getVersionNumber()

Gets the version of Storage Analytics Logging used to record the entry.

void setAuthenticationType(String authenticationType)
void setClientRequestId(String clientRequestId)
void setConditionsUsed(String conditionsUsed)
void setEndToEndLatencyInMS(Integer endToEndLatencyInMS)
void setETagIdentifier(String eTagIdentifier)
void setHttpStatusCode(String httpStatusCode)
void setLastModifiedTime(Date lastModifiedTime)
void setOperationCount(Integer operationCount)
void setOperationType(String operationType)
void setOwnerAccountName(String ownerAccountName)
void setReferrerHeader(String referrerHeader)
void setRequestContentLength(Long requestContentLength)
void setRequestedObjectKey(String requestedObjectKey)
void setRequesterAccountName(String requesterAccountName)
void setRequesterIPAddress(String requesterIPAddress)
void setRequestHeaderSize(Long requestHeaderSize)
void setRequestIdHeader(UUID requestIdHeader)
void setRequestMD5(String requestMD5)
void setRequestPacketSize(Long requestPacketSize)
void setRequestStartTime(Date requestStartTime)
void setRequestStatus(String requestStatus)
void setRequestUrl(URI requestUrl)
void setRequestVersionHeader(String requestVersionHeader)
void setResponseHeaderSize(Long responseHeaderSize)
void setResponsePacketSize(Long responsePacketSize)
void setServerLatencyInMS(Integer serverLatencyInMS)
void setServerMD5(String serverMD5)
void setServiceType(String serviceType)
void setUserAgentHeader(String userAgentHeader)
void setVersionNumber(String versionNumber)

Field Details

LAST_MODIFIED_TIME_FORMAT

protected static final SimpleDateFormat LAST_MODIFIED_TIME_FORMAT= new SimpleDateFormat( "E, dd-MMM-yy HH:mm:ss 'GMT'")

Holds the date format for the LastModifiedTime field.

REQUEST_START_TIME_FORMAT

protected static final SimpleDateFormat REQUEST_START_TIME_FORMAT= new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss.SSSSSSS'Z'")

Holds the date format for the RequestStartTime field.

Constructor Details

LogRecord

protected LogRecord()

Initializes a new instance of the LogRecord class.

LogRecord

protected LogRecord(LogRecordStreamReader reader)

Initializes a new instance of the LogRecord class using a LogRecordStreamReader to populate.

Parameters:

reader - the LogRecordStreamReader to use to populate the LogRecord.

Throws:

IOException
ParseException
URISyntaxException

Method Details

getAuthenticationType

public String getAuthenticationType()

Gets whether the request was authenticated, anonymous, or used Shared Access Signature (SAS).

Returns:

a String containing the AuthenticationType value

getClientRequestId

public String getClientRequestId()

Gets the x-ms-client-request-id header value included in the request.

Returns:

an encoded String containing the ClientRequestId value

getConditionsUsed

public String getConditionsUsed()

Gets conditions used, as an encoded string semicolon-separated list in the form of ConditionName=value .

Returns:

an encoded String containing the ConditionsUsed value

getEndToEndLatencyInMS

public Integer getEndToEndLatencyInMS()

Gets the total time in milliseconds to perform the requested operation, including the time to read the incoming request and send the response to the requester.

Returns:

an Integer containing the EndToEndLatencyInMS value

getETagIdentifier

public String getETagIdentifier()

Gets the ETag identifier for the returned object as an encoded string.

Returns:

an encoded String containing the ETagIdentifier value

getHttpStatusCode

public String getHttpStatusCode()

Gets the HTTP status code for the request. If the request is interrupted, this value may be set to Unknown.

Returns:

a String containing the HttpStatusCode value

getLastModifiedTime

public Date getLastModifiedTime()

Gets the Last Modified Time (LMT) for the returned object as an encoded string. This field is null for operations that can return multiple objects.

Returns:

a Date containing the LastModifiedTime value

getOperationCount

public Integer getOperationCount()

Gets the number of each logged operation for a request, using an index of zero. Some requests require more than one operation, such as Copy Blob, though most perform just one operation.

Returns:

an Integer containing the OperationCount value

getOperationType

public String getOperationType()

Gets the type of REST operation performed.

Returns:

a String containing the OperationType value

getOwnerAccountName

public String getOwnerAccountName()

Gets the account name of the service owner.

Returns:

a String containing the OwnerAccountName value

getReferrerHeader

public String getReferrerHeader()

Gets the Referrer header value as an encoded string.

Returns:

an encoded String containing the ReferrerHeader value

getRequestContentLength

public Long getRequestContentLength()

Gets the value of the Content-Length header for the request sent to the storage service. If the request was successful, this value is equal to request-packet-size. If a request is unsuccessful, this value may not be equal to request-packet-size, or it may be null.

Returns:

a Long containing the RequestContentLength value

getRequestedObjectKey

public String getRequestedObjectKey()

Gets the key of the requested object as an encoded string. This field will always use the account name, even if a custom domain name has been configured.

Returns:

a String containing the RequestedObjectKey value

getRequesterAccountName

public String getRequesterAccountName()

Gets the account name making the request, if the request is authenticated. This field will be null for anonymous and SAS requests.

Returns:

a String containing the RequesterAccountName value

getRequesterIPAddress

public String getRequesterIPAddress()

Gets the IP address and port of the requester.

Returns:

a String containing the RequesterIPAddress value

getRequestHeaderSize

public Long getRequestHeaderSize()

Gets the size of the request header, in bytes. If a request is unsuccessful, this value may be null.

Returns:

a Long containing the RequestHeaderSize value

getRequestIdHeader

public UUID getRequestIdHeader()

Gets the request ID assigned by the storage service. This is equivalent to the value of the x-ms-request-id header.

Returns:

a UUID containing the RequestIdHeader value

getRequestMD5

public String getRequestMD5()

Gets the value of either the Content-MD5 header or the x-ms-content-md5 header in the request as an encoded string. The MD5 hash value specified in this field represents the content in the request. This field can be null.

Returns:

an encoded String containing the RequestMD5 value

getRequestPacketSize

public Long getRequestPacketSize()

Gets the size of the request packets read by the storage service, in bytes. If a request is unsuccessful, this value may be null.

Returns:

a Long containing the RequestPacketSize value

getRequestStartTime

public Date getRequestStartTime()

Gets the time in UTC when the request was received by Storage Analytics.

Returns:

a String containing the RequestStartTime value

getRequestStatus

public String getRequestStatus()

Gets the status of the requested operation.

Returns:

a String containing the RequestStatus value

getRequestUrl

public URI getRequestUrl()

Gets the complete URL of the request.

Returns:

a URI containing the RequestUrl value

getRequestVersionHeader

public String getRequestVersionHeader()

Gets the storage service version specified when the request was made. This is equivalent to the value of the x-ms-version header.

Returns:

a String containing the RequestVersionHeader value

getResponseHeaderSize

public Long getResponseHeaderSize()

Gets the size of the response header, in bytes. If a request is unsuccessful, this value may be null.

Returns:

a Long containing the ResponseHeaderSize value

getResponsePacketSize

public Long getResponsePacketSize()

Gets the size of the response packets written by the storage service, in bytes. If a request is unsuccessful, this value may be null.

Returns:

a Long containing the ResponsePacketSize value

getServerLatencyInMS

public Integer getServerLatencyInMS()

Gets the total time in milliseconds to perform the requested operation. This value does not include network latency (the time to read the incoming request and send the response to the requester).

Returns:

an Integer containing the ServerLatencyInMS value

getServerMD5

public String getServerMD5()

Gets the value of the MD5 hash calculated by the storage service as an encoded string.

Returns:

an encoded String containing the ServerMD5 value

getServiceType

public String getServiceType()

Gets the requested storage service: blob, table, or queue.

Returns:

a String containing the ServiceType value

getUserAgentHeader

public String getUserAgentHeader()

Gets the User-Agent header value as an encoded string.

Returns:

an encoded String containing the UserAgentHeader value

getVersionNumber

public String getVersionNumber()

Gets the version of Storage Analytics Logging used to record the entry.

Returns:

a String containing the VersionNumber value

setAuthenticationType

protected void setAuthenticationType(String authenticationType)

Parameters:

authenticationType - the authenticationType to set

setClientRequestId

protected void setClientRequestId(String clientRequestId)

Parameters:

clientRequestId - the clientRequestId to set

setConditionsUsed

protected void setConditionsUsed(String conditionsUsed)

Parameters:

conditionsUsed - the conditionsUsed to set

setEndToEndLatencyInMS

protected void setEndToEndLatencyInMS(Integer endToEndLatencyInMS)

Parameters:

endToEndLatencyInMS - the endToEndLatencyInMS to set

setETagIdentifier

protected void setETagIdentifier(String eTagIdentifier)

Parameters:

eTagIdentifier - the eTagIdentifier to set

setHttpStatusCode

protected void setHttpStatusCode(String httpStatusCode)

Parameters:

httpStatusCode - the httpStatusCode to set

setLastModifiedTime

protected void setLastModifiedTime(Date lastModifiedTime)

Parameters:

lastModifiedTime - the lastModifiedTime to set

setOperationCount

protected void setOperationCount(Integer operationCount)

Parameters:

operationCount - the operationCount to set

setOperationType

protected void setOperationType(String operationType)

Parameters:

operationType - the operationType to set

setOwnerAccountName

protected void setOwnerAccountName(String ownerAccountName)

Parameters:

ownerAccountName - the ownerAccountName to set

setReferrerHeader

protected void setReferrerHeader(String referrerHeader)

Parameters:

referrerHeader - the referrerHeader to set

setRequestContentLength

protected void setRequestContentLength(Long requestContentLength)

Parameters:

requestContentLength - the requestContentLength to set

setRequestedObjectKey

protected void setRequestedObjectKey(String requestedObjectKey)

Parameters:

requestedObjectKey - the requestedObjectKey to set

setRequesterAccountName

protected void setRequesterAccountName(String requesterAccountName)

Parameters:

requesterAccountName - the requesterAccountName to set

setRequesterIPAddress

protected void setRequesterIPAddress(String requesterIPAddress)

Parameters:

requesterIPAddress - the requesterIPAddress to set

setRequestHeaderSize

protected void setRequestHeaderSize(Long requestHeaderSize)

Parameters:

requestHeaderSize - the requestHeaderSize to set

setRequestIdHeader

protected void setRequestIdHeader(UUID requestIdHeader)

Parameters:

requestIdHeader - the requestIdHeader to set

setRequestMD5

protected void setRequestMD5(String requestMD5)

Parameters:

requestMD5 - the requestMD5 to set

setRequestPacketSize

protected void setRequestPacketSize(Long requestPacketSize)

Parameters:

requestPacketSize - the requestPacketSize to set

setRequestStartTime

protected void setRequestStartTime(Date requestStartTime)

Parameters:

requestStartTime - the requestStartTime to set

setRequestStatus

protected void setRequestStatus(String requestStatus)

Parameters:

requestStatus - the requestStatus to set

setRequestUrl

protected void setRequestUrl(URI requestUrl)

Parameters:

requestUrl - the requestUrl to set

setRequestVersionHeader

protected void setRequestVersionHeader(String requestVersionHeader)

Parameters:

requestVersionHeader - the requestVersionHeader to set

setResponseHeaderSize

protected void setResponseHeaderSize(Long responseHeaderSize)

Parameters:

responseHeaderSize - the responseHeaderSize to set

setResponsePacketSize

protected void setResponsePacketSize(Long responsePacketSize)

Parameters:

responsePacketSize - the responsePacketSize to set

setServerLatencyInMS

protected void setServerLatencyInMS(Integer serverLatencyInMS)

Parameters:

serverLatencyInMS - the serverLatencyInMS to set

setServerMD5

protected void setServerMD5(String serverMD5)

Parameters:

serverMD5 - the serverMD5 to set

setServiceType

protected void setServiceType(String serviceType)

Parameters:

serviceType - the serviceType to set

setUserAgentHeader

protected void setUserAgentHeader(String userAgentHeader)

Parameters:

userAgentHeader - the userAgentHeader to set

setVersionNumber

protected void setVersionNumber(String versionNumber)

Parameters:

versionNumber - the versionNumber to set

Applies to