0

I am trying to fetch invocation id of an Azure Function using the app insights query:

requests
| project
    id,
    operation_Name,
    operation_Id,
    cloud_RoleName,
    invocationId=customDimensions['InvocationId']
| where cloud_RoleName =~ 'appname' and operation_Name =~ 'Gen'

And The result table shows no value for invocation id:

enter image description here

Am I missing something? Please let me know in the comment If I can add more information. Thanks.

Deepak
  • 2,660
  • 2
  • 8
  • 23

1 Answers1

0

I tried to reproduce your issue as I have got the invocation Id in the logs by following the below steps:

  1. Created the Function App (.Net Core 6 Stack) in Azure with the HTTP Trigger Function Class inside the Azure Portal.

  2. Open the Function App> Click on Logs in Monitoring Menu (left index pane) > Close this dialog box

enter image description here

  1. Copied your query to get the results, where in the query: cloud_RoleName is given as FunctionAppName, operation_Name is given as FunctionName.

enter image description here

  • Thanks for trying, @HariKrishnaRajoli-MT. Even the same steps worked for me in a new function app. But I am not sure why the invocation id in my existing function app is not displayed. Invocation Id is a system-defined value but why's that missing in my case? FYI, I have deployed this app using ARM template. Am I missing to configure something that displays the invocation id? – Deepak Dec 07 '21 at 08:53
  • Could you please provide your ARM template, parameters used to deploy it? –  Dec 07 '21 at 09:07