-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Txn source: "url" even though set manually in beforeNavigate() #8182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What should the change look like? Removing the name change check would always set the source to custom even if users change around different stuff in beforeNavigate but don't change the transaction name. |
@lforst what do you think? |
@realkosty I don't think the code section you identified as the root cause is the actual problem - unless I am missing somthing ofc. Can you elaborate a bit how "url" may end up in the new transaction source here? |
@lforst this behavior happens specifically when |
Hmm I honestly still think this is fine generally but I can see how this is a problem for users who manually try to parameterize their routes and come across routes that don't have parameters at all. Like The problem I see with removing this check is that if users leave urls with params as-is (e.g. |
I am not sure if we should change the current behaviour. What the user could do however is something like:
Does that sound reasonable? In general, I am wondering if we should set transactions with the name |
Unless we want to remove the equality check (i.e. assume calling
It's worth a thought IMO but probably quite intransparent for users ("i.e. why is |
I can see how this may be tricky to implement but don't get the principal objections:
What's so controversial about this? |
Nothing's controversial. Maybe the tone of the conversation didn't transfer well here ^^ I also get the frustration. I think the reason Lukas and I are a bit careful and not jumping to fixes is because this has gone through a 💩-ton of discussions already, and we basically settled that we were gonna have server-side heuristics in relay to parameterize transactions in cases where it's not possible to parameterize with 100% certainty (like in this case). As for Btw if "/" shows up under unparameterized, we likely have an issue in Relay with the auto-grouping logic. These transactions should very likely be promoted to parameterized. cc @jjbayer @iker-barriocanal |
@lforst Got it, thanks for the context. I understand the pushback/caution since changing this may have all sorts of implications and might miss something important that came up in those past discussions.
There is indeed an issue and Relay team is aware of it. Sorry if I didn't make that clear. But there always be edge-cases - after all it's heuristic, don't you think? Customers need a way to override it by manually specifying txn name. Right now in the when you click on << unparameterized >> in the transactions list you get this callout: |
In general, whenever the user sets the transaction name, its source should be set to |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Uh oh!
There was an error while loading. Please reload this page.
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/browser
SDK Version
7.51.1
Framework Version
No response
Link to Sentry event
*** See linked Jira ticket ***
SDK Setup
Steps to Reproduce
Go to customer website *** see linked Jira ticket ***
Capture a few dozen pageloads until transaction is sampled (their tracesSampleRate is 0.1), get the id
Look at txn in Sentry.
Examine their
sentry.js
if needed for more detailExpected Result
transaction.source: "custom"
Actual Result
transaction.source: "url"
ROOT CAUSE: https://github.com/getsentry/sentry-javascript/blob/ff4b1a85b3c04d2782880629b0d5be591568deaf/packages/tracing-internal/src/browser/browsertracing.ts#LL297C49-L297C49
Original PR: #5396
┆Issue is synchronized with this Jira Improvement by Unito
The text was updated successfully, but these errors were encountered: