application insights: what is the difference between pageViews and requests?

%3CLINGO-SUB%20id%3D%22lingo-sub-997365%22%20slang%3D%22en-US%22%3Eapplication%20insights%3A%20what%20is%20the%20difference%20between%20pageViews%20and%20requests%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-997365%22%20slang%3D%22en-US%22%3E%3CP%3Eunder%20logs%2C%20what%20is%20the%20difference%20between%20pageViews%20and%20requests%3F%26nbsp%3B%20Neither%20seems%20to%20correspond%20to%20what%20cloudflare%20logs%20tell%20us%20(e.g.%20cloudflare%20shows%2020%2C000%20hits%20for%20a%20particular%20URL%20in%20a%20given%20period%2C%20application%20insights%20shows%2010.%26nbsp%3B%20Also%2C%20the%20client%20IP%20is%20always%20blank%2C%20so%20we%20cant%20correlate%20hack%20attacks%20with%20the%20IPs%20they%20came%20from.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-997365%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EApplication%20Insights%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1004292%22%20slang%3D%22en-US%22%3ERe%3A%20application%20insights%3A%20what%20is%20the%20difference%20between%20pageViews%20and%20requests%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1004292%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F453032%22%20target%3D%22_blank%22%3E%40acehobbs%3C%2FA%3E%2C%26nbsp%3B%3C%2FP%3E%3CP%3EpageViews%20and%20requests%20are%20similar%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%20Request%20-%20Send%20information%20about%20a%20request%20handled%20by%20the%20application.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%20PageViews%20-%26nbsp%3BSend%20information%20about%20the%20page%20viewed%20in%20the%20application.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EIn%20practice%20though%20the%20challenge%20is%20identifying%20what%20is%20sending%20the%20information%20and%20what%20settings%20have%20been%20applied.%20Assuming%20this%20is%20a%20asp.net%20web%20app%2C%20have%20a%20look%20at%20the%20application%20insights%20configuration%20file.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ETake%20a%20look%20to%20see%20if%20any%20sampling%20has%20been%20applied.%20A%20common%20way%20to%20do%20this%20is%20to%20add%20a%20TelemetryProcessor%20like%20the%20following%3A%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CSPAN%3E%3CADD%20type%3D%22Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor%2C%20Microsoft.AI.ServerTelemetryChannel%22%3E%3CBR%20%2F%3E%3CMAXTELEMETRYITEMSPERSECOND%3E5%3C%2FMAXTELEMETRYITEMSPERSECOND%3E%3CBR%20%2F%3E%3CEXCLUDEDTYPES%3EEvent%3BException%3C%2FEXCLUDEDTYPES%3E%3CBR%20%2F%3E%3C%2FADD%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

under logs, what is the difference between pageViews and requests?  Neither seems to correspond to what cloudflare logs tell us (e.g. cloudflare shows 20,000 hits for a particular URL in a given period, application insights shows 10.  Also, the client IP is always blank, so we cant correlate hack attacks with the IPs they came from.

1 Reply
Highlighted

Hello @acehobbs

pageViews and requests are similar

  Request - Send information about a request handled by the application.

  PageViews - Send information about the page viewed in the application.

 

In practice though the challenge is identifying what is sending the information and what settings have been applied. Assuming this is a asp.net web app, have a look at the application insights configuration file.

 

Take a look to see if any sampling has been applied. A common way to do this is to add a TelemetryProcessor like the following:

 

<Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel">
<MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond>
<ExcludedTypes>Event;Exception</ExcludedTypes>
</Add>