faro-web-sdk
faro-web-sdk copied to clipboard
Faro will create new traces if a relative /collect url is used
Description
Given you have:
- Webserver
- Grafana-Agent
- Faro SDK w/ tracing
If you hit /collect from your app, using a relative path, then faro will create a new trace because the request url is not equal to the ignore url.
Steps to reproduce
Project reproducing it: https://github.com/beatyt-exl/faro-loop-issue
- Initialize Faro SDK with a relative url of
/collectrather than an absolute one
Expected behavior
Traces should not start new traces.
Actual behavior
Traces start new traces.
Environment
SDK version: 1.3.4 / CDN Device type: desktop OS: Windows 1 Browser: Chrome 120
Demo
https://github.com/grafana/faro-web-sdk/assets/139994713/df78c701-f662-4185-b7b8-1e15b459ad5d