Tushar Kesare
Tushar Kesare

Reputation: 790

Azure application diagnostics log message size limit

I am using Trace.Error() to log error messages to Azure Table Storage. I observed that some messages are not being logged since they are too big in size.

https://msdn.microsoft.com/en-us/library/azure/jj553018.aspx This site mentions that there is maximum 64KB limit per column in azure table storage. But I see that messages bigger than around 40KB are not being logged.

I want to know maximum message size limit so that I can truncate the error message to that limit and log it successfully.

Upvotes: 1

Views: 1407

Answers (1)

Gaurav Mantri
Gaurav Mantri

Reputation: 136196

From the same link:

String A UTF-16-encoded value. String values can be up to 64 KB in size.

Based on this, each character is stored in 2 bytes. Thus maximum amount of characters that you can store in a table attribute is 32K. So to be on the safe side, I would say that truncate your messages so that they don't exceed 32K limit.

Upvotes: 2

Related Questions