Skip to content

[BUG] TrackPageView does not reset maxAjaxCallsPerView #2594

@damian-przygodzki

Description

@damian-przygodzki

Description/Screenshot

The problem i observed is that either automatic route tracking or explicit trackPageView does not reset maxAjaxCallsPerView and afters some time App Insights throws an exception that app exceeded limit.

Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.

Steps to Reproduce

  1. maxAjaxCallsPerView set to 10
  2. enableAutoRouteTracking set to true
  3. Two routes set, with components that fetches a request, with trackPageView in useEffect (without deps) on each of them.
  4. 5 consecutive toggles between pages results in exception that Maximum ajax per page limit reached.
  • OS/Browser: OSX
  • React Version: 18.2.0
  • React Router: 6.21
  • AppInsights React Js: 18.3.6
  • AppInsights Web: 3.3.6

Expected behavior
I would expect that maxAjaxCallsPerView resets each route change.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions