Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Whats the basic purpose of OperationContext in table.Execute in Azure Table Storage?

Whats the basic purpose of OperationContext in table.Execute command while inserting data in Azure Table Storage?

I happen to see the table.Execute command having parameter called OperationContext ...Whats the purpose of it..and also I see the OperationContext class has 2 events

`opContext.SendingRequest += opContext_SendingRequest;
opContext.ResponseReceived+=opContext_ResponseReceived;`

whats the purpose of it...what it helps in the table.Execute command .?...If any examples deeply Appriciates....

like image 770
DeepakKumar Avatar asked Nov 21 '13 12:11

DeepakKumar


1 Answers

The documentation for OperationContext states:

Represents the context for a request to the storage service and provides additional runtime information about its execution.

While mostly it can be used to track service execution (like how much time the request took etc.), one important thing here is that you can pass something specific to your environment in ClientRequestID field and that gets persisted in storage analytics logs so that you can do better tracing of requests and correlate it with your system logging.

like image 186
Gaurav Mantri Avatar answered Oct 06 '22 00:10

Gaurav Mantri