faro-web-sdk icon indicating copy to clipboard operation
faro-web-sdk copied to clipboard

Faro will create new traces if a relative /collect url is used

Open beatyt-exl opened this issue 1 year ago • 0 comments

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

  1. Initialize Faro SDK with a relative url of /collect rather 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

beatyt-exl avatar Dec 13 '23 15:12 beatyt-exl