Hoppe
Hoppe

Reputation: 6815

App Insights responds with, "HTTP/1.1 206 Telemetry sampled out."

In Fiddler I can see my exception being sent to App Insights. App Insights responds with, "HTTP/1.1 206 Telemetry sampled out."

I do not see this error logged previously, or at all, in App Insights. Can someone help me understand why I am seeing the 206 response? Have too many other exceptions been logged to App Insights, so it is sampling this one out?

My iKey looks correct.

Steps to Reproduce Call appInsights.trackException explicitly. appInsights.trackException(t);

Windows 10

Expected behavior Exception should show in App Insights.

Additional context Exception does not show in App Insights

I am using an old version of the SDK. But hoping that someone can explain the 206 response from App Insights.

HTTP/1.1 206 Telemetry sampled out. Content-Type: application/json; charset=utf-8 x-ms-session-id: ... Strict-Transport-Security: max-age=31536000 Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Name, Content-Type, Accept, Sdk-Context Access-Control-Allow-Origin: * Access-Control-Max-Age: 3600 X-Content-Type-Options: nosniff Date: Mon, 23 Aug 2021 13:33:56 GMT Content-Length: 287

{"itemsReceived":3,"itemsAccepted":0,"errors":[{"index":0,"statusCode":206,"message":"Telemetry sampled out."},{"index":1,"statusCode":206,"message":"Telemetry sampled out."},{"index":2,"statusCode":206,"message":"Telemetry sampled out."}],"appId":"xyz..."}

Upvotes: 1

Views: 1213

Answers (2)

Rostislav V
Rostislav V

Reputation: 1798

How I resolved my issue: Open your Application Insights in Azure. Go to "Usage and estimated costs". Click "Data sampling". Then set "All data (100%)". Click "Ok" to apply.

Upvotes: 1

Peter Bons
Peter Bons

Reputation: 29870

I do not see this error logged previously

Sampling not an error. It is turned on by default in many scenarios. For javascript you can configure sampling as outlined here

It could also be that you hit the daily data cap:

When you create an Application Insights resource in the Azure portal, the daily cap is set to 100 GB/day. When you create an Application Insights resource in Visual Studio, the default is small (only 32.3 MB/day).

I suspect it is the latter, as when sampling is turned on using the sdk you wouldn't see it cross the wire. Please see this doc describing how to adjust the cap.

Upvotes: 4

Related Questions