I am using Azure Log Analytics as part of Azure Application Insights. I am trying to write some Kusto queries to parse some logging generated using the Application Insights Javascript SDK. Here are some sample messages:
"index.ts: imports: 1556.916ms"
"index.ts: imports: 110.486ms import { } from '@azure/keyvault-secrets'"
"index.ts: imports: 110.396ms import { } from '@azure/event-hubs'"
"index.ts: imports: 110.023ms import { } from 'applicationinsights'"
"index.ts: imports: 0.131ms import { } from '@azure/functions'"
In Log Analytics inside of Azure Application Insights, I am trying to extract out the file name from the message column using extract()
. So far, my Kusto Query looks like:
traces
| where message contains "imports"
| extend file = extract("^.+\.ts", 1, message)
| sort by timestamp desc
| limit 100
When I try running this query, I get an error stating:
Syntax Error
If issue persists, please open a support ticket.
Request id: 124e777f-136e-4a75-8fa7-a49483a12902
What am I missing and where is my error?