You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pre-flight Transactions being registered as Unknown #1835
Pre-flight requests are being registered as transactions by the SDK, not sure what's the ideal case here, but, they are all grouped as Unknown Route with OPTIONS as http method.
Expected Result
A formatted transaction name. (or discarded transaction)
EDIT 2: I could not repro it, but I'll keep investigating it
EDIT 3: It may be related to users calling an endpoint with the wrong Method (GET ...path, where path only accepts POST), in this case it defaults the method to OPTIONS. Now what I really dont know is why the status code I saw was ok 🤣
OldMessage.
I was only able to repro it within .NET Core 3.1 (Only tested on .NET 6 and .NET Core 3.1).

It seems flaky as I shown on the picture, at some runs it stores the transaction name, but there is other times where it gives a Unknown Route as a path, it also seems to only be happening on the Option Route.
Sample: https://github.com/getsentry/sentry-dotnet/tree/sample/option-tracing-issue
I amrunning the following test
sentry-dotnet\test\Sentry.AspNetCore.Tests\VersioningTests.cs -> SimpleOptionRoute
I didn't validate if Verify is working or not, all I did was add a breakpoint to check the payload content on line 132.
EDIT: Oh there's a weird behavior, despite setting the test runner to run in .NET Core 3.1, it was running on .NET 6 for the first run and the later ones were running on .NET Core 3.1
The issue seems related to the parameter -X OPTIONS ,
Not entirely sure what's the goal of it, but it surely messes up with the Request.
Requests without this field seems to be working just fine.
changed the title [-]Not registering the Transaction name for OPTION requests[/-][+]Transactions are registered as unknown and wrong Http Method (OPTIONS)[/+]on Aug 19, 2022
Basically the client sends two requests one with the Method OPTIONS to see if it's able to perform the request and then the desired request with the correct method and data.
Maybe we should ignore Pre-flighted requests to not cause confusion?
changed the title [-]Transactions are registered as unknown and wrong Http Method (OPTIONS)[/-][+]Pre-flight Transactions being registered as Unknown[/+]on Aug 23, 2022
Activity
mattjohnsonpint commentedon Aug 3, 2022
Any chance we could get a minimal repro? Thanks.
SimonCropp commentedon Aug 3, 2022
@lucas-zimerman the repro could perhaps use a similar approach to https://github.com/getsentry/sentry-dotnet/blob/main/test/Sentry.AspNetCore.Tests/VersioningTests.cs#L22
lucas-zimerman commentedon Aug 11, 2022
@mattjohnsonpint @SimonCropp
EDIT 2: I could not repro it, but I'll keep investigating it
EDIT 3: It may be related to users calling an endpoint with the wrong Method (GET ...path, where path only accepts POST), in this case it defaults the method to OPTIONS. Now what I really dont know is why the status code I saw was ok 🤣
OldMessage.
lucas-zimerman commentedon Aug 12, 2022
Ok so the issue seems related to how the Request is being received:
The issue seems related to the parameter -X OPTIONS ,
Not entirely sure what's the goal of it, but it surely messes up with the Request.
Requests without this field seems to be working just fine.
SimonCropp commentedon Aug 18, 2022
@lucas-zimerman can u share your controller code?
SimonCropp commentedon Aug 18, 2022
@lucas-zimerman i put s=together what i think should be a repro: https://github.com/getsentry/sentry-dotnet/pull/1859/files
and
TheTransactiondoes show up in the payload. is my repro incorrect?[-]Not registering the Transaction name for OPTION requests[/-][+]Transactions are registered as unknown and wrong Http Method (OPTIONS)[/+]lucas-zimerman commentedon Aug 19, 2022
@SimonCropp sorry for the confusion, after further investigation on this issue, it seems related to this:
axios/axios#475 (comment)
Basically the client sends two requests one with the Method
OPTIONSto see if it's able to perform the request and then the desired request with the correct method and data.Maybe we should ignore Pre-flighted requests to not cause confusion?
lucas-zimerman commentedon Aug 19, 2022
The pre-flight request and the request transactions as example.
Header sample from a Pre-flight request:
[-]Transactions are registered as unknown and wrong Http Method (OPTIONS)[/-][+]Pre-flight Transactions being registered as Unknown[/+]SimonCropp commentedon Aug 25, 2022
@lucas-zimerman
i would still like to be able to repro, and debug into it, before we make that call. with that in mind can u help modify https://github.com/getsentry/sentry-dotnet/pull/1859/files to replicate the problem
lucas-zimerman commentedon Aug 26, 2022
@SimonCropp sample test created: #1874
bruno-garcia commentedon Sep 7, 2022
We agreed to avoid sending transactions for HTTP OPTIONS