Find words that are searched for in a web application in Azure monitor, log analytics, or app insights

Yusko, Don (CTR) - FS, VA 25 Reputation points
2024-04-03T20:19:02.51+00:00

We have a web app with a search bar and I am looking to find the metrics or any word that was searched for. I have been through log analytics but it asks to define the keyword and a specific time frame vs a rolling time e.g. past 30 days. I also am not familiar with kusto so that does not help either.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,037 questions
0 comments No comments
{count} votes

Accepted answer
  1. Luis Arias 6,061 Reputation points
    2024-04-03T20:56:14.94+00:00

    Hello Yusko,,

    In your case of tracking words searched in a web application, first you would need to log these search queries in your application code and then send these logs to Azure Monitor, Log Analytics, or Application Insights. Once the data is there, you can use KQL to query it.

    Depends on wich programing language is used you can use the Azure Monitor SDK to send this custom logs:

    https://learn.microsoft.com/en-us/azure/azure-monitor/logs/tutorial-logs-ingestion-code?tabs=net

    Other option is using common API call following this guied:

    https://learn.microsoft.com/en-us/azure/azure-monitor/logs/tutorial-logs-ingestion-portal

    Besides that You definetevely will need Kusto to query this information:

    https://learn.microsoft.com/en-us/training/modules/write-first-query-kusto-query-language/

    If the information helped address your question, please Accept the answer.

    Luis

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful