How to Retrieve Synapse Notebook Execution Metrics Using Log Analytics?

Gabriel25 545 Reputation points
2024-12-06T06:58:26.6366667+00:00

I am trying to gather usage insights for Synapse Analytics notebook executions using Log Analytics. Specifically, I want to identify details such as the users with the highest notebook execution counts, execution durations, and other relevant metrics.

Does Synapse Analytics provide a built-in table or logs that can be queried with KQL to extract such information?

 

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Smaran Thoomu 32,525 Reputation points Microsoft External Staff Moderator
    2024-12-06T13:07:18.85+00:00

    Hi @Gabriel-2005
    Welcome to Microsoft Q&A platform and thanks for posting your query here.

    Synapse Analytics doesn't directly log notebook execution metrics (like execution counts or durations) to Log Analytics by default. However, you can leverage Azure Monitor integration and custom logging to capture and analyze these details.

    Here’s how you can retrieve and work with such metrics.

    First, configure diagnostic settings and set up a Synapse workspace to send logs to the workspace.

    enter image description here

    Once the logs are sent, you can query them using the following sample query. Explore the AzureSynapseAnalyticsWorkspaces table to find notebook execution events:

    <AzureSynapseAnalyticsWorkspaces> 
    | where OperationName == "<required operation>" 
    | summarize count() by Caller 
    | top 20 by count_
    
    
    

    Navigate to Logs > Synapse Workspace Logs and use a KQL query to query the AzureSynapseAnalyticsWorkspacesNotebookLogs.

    This approach will allow you to retrieve the necessary logs effectively.

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.