Understanding Metrics Metadata on Authorities and Containers

[This document supports a preliminary release of a software product that may be changed substantially prior to final commercial release. This document is provided for informational purposes only.]

Service users often want to know the usage pattern of the service. Microsoft® SQL Data Services (SDS) user may want to find:

  • How many containers or entities do I have?
  • What is the total storage consumed by an authority or a container?
  • What is the amount storage used by blobs in a container?
  • What is the aggregate number of requests (GET, POST, PUT and so on) sent against an authority or a container?
  • What is the number of request and response bytes sent with a specific authority or container in scope?

SQL Data Services (SDS) provides metrics information on Authorities and Containers. Developers can use to analyze service usage and optimize for the usage and the bandwidth costs involved in the data transfer to and from the service. This metrics information can also be used to analyze data usage patterns for business analysis. For example, usage pattern may show certain containers and entities accessed more than others.

The service provides this metrics information as properties on authorities and containers.

  • These properties on an authority report the usage metrics on the containers within it.
  • These properties on a container report the usage metrics on the entities within it.

The following table lists the metrics properties along with their descriptions. Most of these properties are provided on both the authorities and containers except for BlobBytes which is only applicable on containers.

Metadata Property Name Description Supported on Authority, Container or both?

IncomingBytes

Total number of bytes sent to the service with the specific authority or container in scope.

Both

OutgoingBytes

Total number of bytes retrieved from the service with specific authority or container in scope. (This metadata on a specific container indicates the number of bytes retrieved from that container).

Both

EntityBytes

Total number of bytes consumed by the flexible entities within the scope.

On an authority, it is the total size, in bytes, of containers flexible entities within the authority. Note that this does not include the bytes consumed by the entities within the containers.

On a container, this metadata property indicates the total size, in bytes, of entities within the container.

Both

BlobBytes

Total number of bytes used by blobs stored in the container.

Container

DeleteCount

Total number of DELETE requests against the scope.

On an authority, it is the number of container delete requests.

On a container, it is the number of entity delete requests.

Both

GetCount

Total number of GET requests against the scope.

On an authority, it is the number of container get requests.

On a container, it is the number of entities get requests.

Both

HeadCount

Total number of HEAD requests against the scope.

Both

PostCount

Total number of POST requests against the scope.

On an authority, it is the number of create container requests.

On a container, it is the number of create entity requests.

Both

PutCount

Total number of PUT requests against the scope.

On an authority, it is the number of update container requests.

On a container, it is the number of update entity requests.

Both

QueryCount

Total number of queries issued within the scope. In this CTP release, the query count is not computed. It is set to 0.

On an authority, it is the number of query requests sent with the authority in scope.

On a container, it is the number of query requests sent with the container in scope.

Both

UnknownCount

Total number of erroneous operations specified within the scope.

On an authority, it is the number of such requests sent with the authority in scope.

On a container, it is the number of such requests sent with the container in scope.

Both

EntityCount

Contains the total number of Flexible Entities in the scope.

On an authority, it is the number of containers.

On a container, it is the number of entities.

Both

Note

Each metrics update results in a new Version number for the corresponding authorities and containers.

A sample authority with metrics properties is shown below:

<s:Authority xmlns:s="https://schemas.microsoft.com/sitka/2008/03/" 
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
             xmlns:x="http://www.w3.org/2001/XMLSchema">
  <s:Id>authority-id</s:Id>
  <s:Version>2012</s:Version>
  <IncomingBytes xsi:type="x:decimal">1314</IncomingBytes>
  <OutgoingBytes xsi:type="x:decimal">9031</OutgoingBytes>
  <PhysicalIO xsi:type="x:decimal">0</PhysicalIO>
  <LogicalIO xsi:type="x:decimal">37</LogicalIO>
  <EntityBytes xsi:type="x:decimal">140</EntityBytes>
  <DeleteCount xsi:type="x:decimal">0</DeleteCount>
  <GetCount xsi:type="x:decimal">4</GetCount>
  <HeadCount xsi:type="x:decimal">0</HeadCount>
  <PostCount xsi:type="x:decimal">1</PostCount>
  <PutCount xsi:type="x:decimal">0</PutCount>
  <QueryCount xsi:type="x:decimal">0</QueryCount>
  <UnknownCount xsi:type="x:decimal">0</UnknownCount>
  <EntityCount xsi:type="x:decimal">1</EntityCount>
</s:Authority>

A sample container with metrics properties is shown below:

<s:Container xmlns:s="https://schemas.microsoft.com/sitka/2008/03/" 
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
             xmlns:x="http://www.w3.org/2001/XMLSchema">
  <s:Id>c1</s:Id>
  <s:Version>2014</s:Version>
  <IncomingBytes xsi:type="x:decimal">908</IncomingBytes>
  <OutgoingBytes xsi:type="x:decimal">4242</OutgoingBytes>
  <PhysicalIO xsi:type="x:decimal">0</PhysicalIO>
  <LogicalIO xsi:type="x:decimal">12</LogicalIO>
  <EntityBytes xsi:type="x:decimal">48</EntityBytes>
  <BlobBytes xsi:type="x:decimal">0</BlobBytes>
  <DeleteCount xsi:type="x:decimal">0</DeleteCount>
  <GetCount xsi:type="x:decimal">2</GetCount>
  <HeadCount xsi:type="x:decimal">0</HeadCount>
  <PostCount xsi:type="x:decimal">1</PostCount>
  <PutCount xsi:type="x:decimal">0</PutCount>
  <QueryCount xsi:type="x:decimal">0</QueryCount>
  <UnknownCount xsi:type="x:decimal">0</UnknownCount>
  <EntityCount xsi:type="x:decimal">1</EntityCount>
</s:Container>

For examples of queries the metrics properties see Specifying Queries Using REST or the Browser.

See Also

Concepts

SDS Data Model Overview (Authorities, Containers, Entities and Flexible Entities)
Guidelines and Limitations