In general Table Storage has this awesome feature to check what kind of heresy we're creating by turning on diagnostics logs in the portal. It allows us to analyze queries and operations, so it's possible to find potentially problematic places and tweak them with ease. This functionality has one major drawback - we have to actually deploy our application and run it in the cloud.

For most of the time you'll be developing using Table Storage Emulator. It'd great to check all our queries right after developing a feature. What options do we have? In fact Emulator has its own logs - they won't be as good and smooth as with full diagnostics, but for most scenarios they should be sufficient.

In the portal we have plenty of options we can use to analyze Table Storage performance

Enabling logging locally

To enable logging, you have to rutn this feature on in the Emulator config. You can find it located here:

To turn logging on you have to change LoggingEnabled property to true. If you have Emulator running, you'll have to restart it.

Reading logs

Once logging is enabled you'll see, that in the following location:

C:\Users\{USER}\AppData\Local\AzureStorageEmulator\Logs

Some files are starting to appear. There're logs with different levels of severity + some performance related information. If everything's running smoothly most of those files won't be helpful for you. In my scenario I find Verbose_debug file most interesting.

This file contains information about requests which are handled by our Emulator. Consider following log:

What now?

Now when I'm able to see how it looks under the hood I'm both confident, that the code I wrote works as expected and I'm able to tweak queries if I must. Maybe I should store Company information with a User to save one query? Maybe I should limit UserXCompany rows fetched? There many possibilities but once you're ready for changes, things should be easier in the future.