Forum Discussion

Suraj_Ncircle's avatar
Suraj_Ncircle
Frequent Visitor
1 year ago

Collecting Analytics Data from a Power BI Custom Connector

Hi,

I have developed a custom connector for Power BI Desktop and would like to collect analytics data to monitor its usage and performance. Specifically, I want to capture:

  • Query execution time
  • Connector failure data
  • Details of users (e.g., user IDs or anonymized data) who are using the connector

To achieve this, I attempted to post the data to a server by sending the execution time of queries. However, I noticed that the server gets called multiple times, and the same execution time is printed every time, which is not the expected behavior.

Is there a proper way to implement analytics collection in a Power BI custom connector? Could you provide any guidance, best practices, or documentation to resolve these issues and ensure accurate data collection?

Thank you in advance for your help!

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Suraj_Ncircle 

     

    You maybe able to use the Diagnostics.Trace function to output trace information to the log.

    Please refer to the following link:

    TripPin 8 - Adding Diagnostics - Power Query | Microsoft Learn

    Diagnostics.Trace - PowerQuery M | Microsoft Learn

     

    You can also seek professional advice in the discussions section of the official Power Query SDK public repository:

    microsoft/vscode-powerquery-sdk · Discussions · GitHub

     

    Best Regards,
    Jarvis Tang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Suraj_Ncircle's avatar
    Suraj_Ncircle
    Frequent Visitor

    Hi  Anonymous
    Thank you for your response.Based on your response, I have the following questions:

    1. I noticed that the Diagnostic.Trace function only logs data if tracing is enabled in the Power BI Desktop application. My requirement is to automatically send analytic data to a analytic platform to track ussage analytics. Is there a way to achieve this?
    2. Is there any way in Power Query to send log files directly to a analytic platform” e.g. (microsoft analytics thru an API)?