Hi vikranth-0706,
Thanks for reaching out to Microsoft Q&A.
Synapse can integrate with azure monitor and log analytics to collect and analyze the metrics and logs. The relevant data about notebook execution is typically captured in the SynapseAnalyticsOperationalLogs table within log analytics. Once the data is collected into this table you can use KQL to query the required details.
https://learn.microsoft.com/en-us/azure/synapse-analytics/spark/apache-spark-azure-log-analytics
For example:
- Time taken for the notebook to complete the execution:
SynapseAnalyticsOperationalLogs
| where OperationName == "NotebookExecution"
| extend StartTime = todatetime(parse_json(parse_json(Properties).startTime))
| extend EndTime = todatetime(parse_json(parse_json(Properties).endTime))
| extend Duration = datetime_diff('second', EndTime, StartTime)
| summarize AvgDuration = avg(Duration), MinDuration = min(Duration), MaxDuration = max(Duration) by NotebookName
| order by AvgDuration desc
- Whch user runs the most number of notebook executions:
SynapseAnalyticsOperationalLogs
| where OperationName == "NotebookExecution"
| extend StartTime = todatetime(parse_json(parse_json(Properties).startTime))
| extend EndTime = todatetime(parse_json(parse_json(Properties).endTime))
| extend Duration = datetime_diff('second', EndTime, StartTime)
| summarize AvgDuration = avg(Duration), MinDuration = min(Duration), MaxDuration = max(Duration) by NotebookName
| order by AvgDuration desc
The SynapseAnalyticsOperationalLogs table captures several other metrics useful for analyzing notebook execution. These queries can be further customized based on your requirements and the structure of your log data.
Please 'Upvote'(Thumbs-up) and 'Accept' as an answer if the reply was helpful. This will benefit other community members who face the same issue.