Closed drew-fc closed 2 months ago
Assigning to @getsentry/support for routing ⏲️
Routing to @getsentry/product-owners-issues for triage ⏲️
Hi @drew-fc This may be a better topic for the Sentry Discord server since you are doing something custom.
Nevertheless, I have noticed at least one thing:
scope.SetExtra("TraceId", transaction.TraceId.ToString()); context.Items["TraceId"] = traceId;
and later on you do this one more time:
scope.SetExtra("TraceId", transaction.TraceId.ToString());
This may be the source of discrepancy between the two different trace ID values you see.
Environment
SaaS (https://sentry.io/)
What are you trying to accomplish?
hi, I am using the C# SDK in an Azure Functions Isolated Worker app. I have some very simple middleware for logging exceptions. It has been working fine, but recently I wanted to enhance it with additional information, like saving the HTTP body of the request to the logs, so I learned about Scopes.
How are you getting stuck?
I updated my code to use Scopes and also to use the CaptureException() function. However, when I start using this new code, I no longer can search using my TraceID (Which I was generating with a GUID at the start). For whatever reason, it stops logging my message after I call CaptureException()?
I tried updating it to use the transaction.TraceID from Sentry instead, but the issue is still there. Here is my code
also, here's a screenshot of the logs, you can see my TraceId isnt actually using the TraceId from Sentry?
Where in the product are you?
Issues
Link
No response
DSN
No response
Version
No response