locked
Tracking requests made directly to blob endpoints RRS feed

  • Question

  • I wish to track each time an image or file is retrieved directly from my blob storage account.  The data is retrieved directly from an endpoint such as http://mystorageaccountname.blob.core.windows.net/filename.jpg.  This is not going through my web role and I cannot see where any record of the file transfer is being logged.

    I know how to transfer the IIS Log for my web application to a storage account for download/parsing and am thinking there must be another log somewhere that tracks activity served directly by the storage account.  Is there a log that tracks requests made to directly to storage account endpoints?

    Monday, August 23, 2010 3:24 PM

Answers

  • Exactly. It is kind of another level of indirection (which is why I mentioned it as workaround). You could provide some kind of consistent URL pattern to users while making requests.

    Also it is important to note that, this approach would incur extra bandwidth cost if computing and storage subscriptions are not in the same data center/affinity group.


    Please mark it as answer by clicking on "Propose As Answer", if it helps
    • Marked as answer by Yi-Lun Luo Friday, August 27, 2010 9:08 AM
    Monday, August 23, 2010 4:31 PM
  • Actually, in this case you'll need to implement any request level tracking you need. Azure Storage does not currently track/expose individual service calls metrics. So if you need that kind of granularity, you'll likely need to expose storage via some type of interface (web role?)
    • Marked as answer by Yi-Lun Luo Friday, August 27, 2010 9:07 AM
    Monday, August 23, 2010 5:29 PM

All replies

  • Hi,

    I believe it is logged somewhere (because you're being billed for it) but is not publicly accessible. I'm sure when billing API becomes available, we will have a mechanism to extract this information programmatically.

    Hope this helps.

    Thanks

    Gaurav Mantri

    Cerebrata Software

    http://www.cerebrata.com

    Monday, August 23, 2010 4:02 PM
  • Since Billing API is available for public use at the moment, here is a thought about a workaround.

    Write some wrapper call in the web role to take the blob name as input and update the counter (one of the meta data of respective blog entry) before returning the blob.


    Please mark it as answer by clicking on "Propose As Answer", if it helps
    Monday, August 23, 2010 4:09 PM
  • Thanks for your replies.  Hopefully the Billing API will indeed give me a way to track bandwidth utilization.

    Rajesh, just to clarify.. you are suggesting to not give my users a direct link to the resource but rather to call my web application which would then log the request myself and return the blob, correct?

     

     

    Monday, August 23, 2010 4:16 PM
  • Exactly. It is kind of another level of indirection (which is why I mentioned it as workaround). You could provide some kind of consistent URL pattern to users while making requests.

    Also it is important to note that, this approach would incur extra bandwidth cost if computing and storage subscriptions are not in the same data center/affinity group.


    Please mark it as answer by clicking on "Propose As Answer", if it helps
    • Marked as answer by Yi-Lun Luo Friday, August 27, 2010 9:08 AM
    Monday, August 23, 2010 4:31 PM
  • Actually, in this case you'll need to implement any request level tracking you need. Azure Storage does not currently track/expose individual service calls metrics. So if you need that kind of granularity, you'll likely need to expose storage via some type of interface (web role?)
    • Marked as answer by Yi-Lun Luo Friday, August 27, 2010 9:07 AM
    Monday, August 23, 2010 5:29 PM
  • Not to beat a dead horse, but...

    While I (easily) created a web role to serve up content from blob storage and track per-resource requests, I have given up one of the greatest benefits that I love about Azure which was that by providing a link directly to the blob resource, my customer's information could be accessible even if my application went down (Denial of Service, Application Error, etc.)

    Does anyone know if there are plans for a billing API? As Gaurav mentioned, the information must be stored somewhere since we are being billed for it. 

    Thursday, October 28, 2010 10:39 PM