Using xEvents to monitor Azure Analysis Services

Data di pubblicazione: 6 aprile, 2017

Principal Program Manager, Azure Analysis Services

In addition to providing BI queries at the speed of thought and a user friendly BI semantic model, Azure Analysis Services supports many manageability features.  One such feature is a rich set of Extended Events (xEvents) which can be used for scenarios ranging from trouble shooting and diagnostics to in depth auditing and usage analysis.

You can use SQL Server Management Studio (SSMS) to configure a xEvents for Azure Analysis Services. Today, you can only configure Azure Analysis services to log to a stream or ring buffer and not to a file. In some cases, you may want to log events for offline analysis or to retain historically. We have provided an example of using the Tabular Object Modeling APIs to create an xEvents session and logging the data to disk and a richer sample to trace to a database with a windows service. The xEvents Logging for Azure Analysis Services sample and ASTrace samples are available on GitHub at https://github.com/Microsoft/Analysis-Services.

The easiest way to use this sample is to use SSMS to configure streaming xEvents to see which events you would like to log. First, create an xEvents session in SSMS. Then pick which events you like to record and set the data mode to streaming. Run some queries or do other operations, and then look at the xEvents in the “Watch Live Data” option on the trace session in SSMS to verify the data. If these events are the ones you want, then you can script these out to a file. 

xEvents with SSMS

The sample program takes the TMSL script file to define the events it will record. Then you can run the sample program to create a new session, and it will trace these events to a file.  Be sure to install the latest Azure Analysis Services client libraries to ensure you have support to integrated authentication. 

Let us know how it works for you or check out the other Azure Analysis Serivces samples on GitHub!