microsoft / microsoft/applicationinsights-react-js

[BUG] Page view loading time not correct

Open
#74 18 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.