Faro data collection inconsistent

  • What Grafana version and what operating system are you using?
    Grafana Cloud, Frontend Observability, Faro SDK

  • What are you trying to achieve?
    Test out Grafana Frontend Observability, be able to generate page load time data in the dashboard.

  • How are you trying to achieve it?
    Add the Faro SDK code via CDN as described here:
    Grafana Cloud Frontend Observability | Grafana Cloud documentation

  • What happened?
    It seems to work for a little bit, then the ‘fetch’ requests to the endpoint stop and no more data is transmitted. I switched to incognito mode, which worked for a while then stopped working. Then i switched to a different browser which is working right now. I suspect it might be somehow configured to stop sending telemetry after some time?

  • What did you expect to happen?
    It should collect data from every page load.

  • Can you copy/paste the configuration(s) that you are having problems with?
    Just the boilerplate code here, which is functional but stops working after a while
    Grafana Cloud Frontend Observability | Grafana Cloud documentation

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    no errors. And the browser developer console doesn’t show any either. just no Fetch requests.

  • Did you follow any online instructions? If so, what is the URL?
    Yes, I’m following the link posted above.

I also had this working with k6 browser for a little bit but that stopped working too.

Anyone know what might be causing this behavior?

I just tested this by opening the website on my cell phone and the page load was recorded. So it seems to be somehow ignoring clients that have connected before. I’ve tried clearing out cookies and using incognito mode but it doesn’t seem to fix it.

Try to clean local storage (not cookie storage) + enable persistent session tracking.
I bet it is a problem with session tracking (you can see “session expired” response with response code 400 from Faro collector in the browser console).
Make sure your page loads latest sdk (1.3.5) - some fixes for session handling were released last week.

I’ll give these a try, thank you.

here’s what i’ve got. This means the SDK is out of date right? I got this right from the Grafana Cloud console install instructions:

<script>
(function () {
  var webSdkScript = document.createElement("script");

  webSdkScript.src =
    "https://unpkg.com/@grafana/faro-web-sdk@^1.0.0/dist/bundle/faro-web-sdk.iife.js";

No. See ^1.0.0 in URL - that means any 1.x version. Visit:

https://unpkg.com/@grafana/faro-web-sdk@^1.0.0/dist/bundle/faro-web-sdk.iife.js

and you will see that it is redirect to:

https://unpkg.com/@grafana/faro-web-sdk@1.3.5/dist/bundle/faro-web-sdk.iife.js

So 1.3.5 will be loaded right now (but your browser may use older cached version eventually).

Using incognito and clearing local storage seems to do the trick, thanks.