We are using the Sentry .NET SDK in an Aure Functions app. When an error is reported during invocation of a function, the breadcrumbs in Sentry include those of prior invocations of the function.
I found this thread where it was suggested a scope should be pushed at the beginning of an operation and popped at the end, and that the breadcrumbs would be filtered to the scope.
I wrapped the code inside the function in a using (SentrySdk.PushScope(Guid.NewGuid().ToString())) { }
block.
The scope and its unique value is visible in Sentry under the issue’s tags, but the breadcrumbs are not filtered to only those that are logged inside the using
block.
We are using Sentry via Serilog.