microsoft / microsoft/applicationinsights-react-js
[BUG] Page view loading time not correct
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 47
- Forks
- 18
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 8
Description
Description/Screenshot
We are using trackPageView function to upload the page view data into the application insight. Data has been updates as expected but the page loading time seem to be constant for all the pages. Page loading time is not real. We are using react function to create the components. We are not following the class structure.
- OS/Browser: ALL
- React Version: 18.2.0
- SDK Version [e.g. 22]: 17.0.0
- How you initialized the SDK:
var reactPlugin = new ReactPlugin();
var appInsights = new ApplicationInsights({
config: {
instrumentationKey: 'YOUR_INSTRUMENTATION_KEY_GOES_HERE',
extensions: [reactPlugin]
}
}
});
appInsights.loadAppInsights();
Expected behavior
Page view loading time should be actual time.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the trackPageView usage and the ReactPlugin initialization shown in the issue, then inspect how functional React components report page views. Reproduce the constant loading-time value across pages and compare it with the expected actual duration. The issue is resolved when page view telemetry records each page's real loading time.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend, observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100