Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Windows Azure programming patterns for Start-ups

You're reading from   Windows Azure programming patterns for Start-ups A step-by-step guide to create easy solutions to build your business using Windows Azure services with this book and ebook.

Arrow left icon
Product type Paperback
Published in Oct 2012
Publisher Packt
ISBN-13 9781849685603
Length 292 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Riccardo Becker Riccardo Becker
Author Profile Icon Riccardo Becker
Riccardo Becker
Arrow right icon
View More author details
Toc

Implementing your own billing tracker


Last year, Microsoft released Windows Azure Storage Analytics, which performs logging and provides metrics on different levels for a specific storage account. The logging and metrics information can be used to find out how many storage transactions you actually performed. This feature of the platform gives you all the information to build your own billing tracker that analyzes this storage analytical information.

Enabling analytics

To turn on Storage Analytics for each service (blob, table, and queue), you must specifically set this in code or use REST requests.

In the following code snippet, everything is explicitly turned on for every service:

CloudStorageAccount account = CloudStorageAccount.DevelopmentStorageAccount;

      CloudBlobClient blobClient = account.CreateCloudBlobClient();
      CloudQueueClient queueClient = account.CreateCloudQueueClient();
      CloudTableClient tableClient = account.CreateCloudTableClient();

      blobClient.SetServiceProperties...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £16.99/month. Cancel anytime