0
votes

We want to pull data from Application Insights using the REST APIs (see https://dev.applicationinsights.io/documentation/overview). Specifically, we need to retrieve data with "GET /query". According to https://docs.microsoft.com/en-us/azure/application-insights/app-insights-analytics-reference, there is an implicit limit on the number of rows that can be returned to the client; and there is also a timeout limit.

When we pull data directly from a Kusto cluster/table, we set 'OptionNoRequestTimeout' and 'OptionNoTruncation' properties to TRUE in the Kusto ClientRequestProperties, which is provided in the Kusto client interface.

I am wondering how I can achieve the same when pulling data with AppInsights "GET /query" REST API to lift the limitation on timeout and number of rows to return?

The AppInsight Analytics Reference briefly mentions that "To lift the row count limit, use the notruncation client request option." w/o explaining how. How shall I set these Kusto request properties on the HTTP request URL, which is sent to the target AppInsights application with a HttpClient?

1

1 Answers

0
votes

You cannot currently override the values for row count (500,000) or total size (64,000,000 bytes) through the REST API.

you can, however, override the timeout, by adding a special header:

Prefer: wait=[seconds]

like

Prefer: wait=600

for 10 minutes, which is the max.

The notruncation part of your question is something you use with set in your actual query, like

set notruncation;
MyTable | take 500000