OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Query AppInsights associated to a FunctionApp via REST API

  • Thread starter Thread starter Cinosarge
  • Start date Start date
C

Cinosarge

Guest
Scenario: Application Insights resource created on the Azure portal and associated with a FunctionApp. The FunctionApp makes calls to log.LogInformation().

I can successfully query endpoint https://api.applicationinsights.io to get the Function logs using an API Access Key generated for the Application Insights. You can see how I do the thing with Postman.

KustoQuery sent to AppInsights using Postman

Unfortunately the API Access Keys will be retired in March 2026 and I shall make use of MS Entra ID.

enter image description here

But clicking the link in the screen i read this:

enter image description here

I only have to query for data and not to submit telemetry to Application Insights. My FunctionApp has both env variables:

  • APPINSIGHTS_INSTRUMENTATIONKEY
  • APPLICATIONINSIGHTS_CONNECTION_STRING (holding instrumentation key too)

Questions are:


  • Is my scenario supported or could be defined as "On-by-default autoinstrumentation/codless monitoring"?


  • Using https://api.loganalytics.io/ would make any difference?
<p><strong>Scenario</strong>: Application Insights resource created on the Azure portal and associated with a FunctionApp. The FunctionApp makes calls to log.LogInformation().</p>
<p>I can successfully query endpoint <a href="https://api.applicationinsights.io" rel="nofollow noreferrer">https://api.applicationinsights.io</a> to get the Function logs using an API Access Key generated for the Application Insights. You can see how I do the thing with Postman.</p>
<p><a href="https://i.sstatic.net/B3OSNKzu.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/B3OSNKzu.png" alt="KustoQuery sent to AppInsights using Postman" /></a></p>
<p>Unfortunately the API Access Keys will be retired in March 2026 and I shall make use of <em>MS Entra ID</em>.</p>
<p><a href="https://i.sstatic.net/5l1s99HO.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/5l1s99HO.png" alt="enter image description here" /></a></p>
<p>But clicking the <a href="https://learn.microsoft.com/en-us/azure/azure-monitor/app/azure-ad-authentication?tabs=net" rel="nofollow noreferrer">link</a> in the screen i read this:</p>
<p><a href="https://i.sstatic.net/Y5wcBIx7.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Y5wcBIx7.png" alt="enter image description here" /></a></p>
<p>I only have to query for data and not to submit telemetry to Application Insights. My FunctionApp has both env variables:</p>
<ul>
<li>APPINSIGHTS_INSTRUMENTATIONKEY</li>
<li>APPLICATIONINSIGHTS_CONNECTION_STRING (holding instrumentation key too)</li>
</ul>
<p><strong>Questions are</strong>:</p>
<ul>
<li><p>Is my scenario supported or could be defined as "On-by-default autoinstrumentation/codless monitoring"?</p>
</li>
<li><p>Using <a href="https://api.loganalytics.io/" rel="nofollow noreferrer">https://api.loganalytics.io/</a> would make any difference?</p>
</li>
</ul>
Continue reading...
 

Latest posts

H
Replies
0
Views
1
habrewning
H
Top