-
-
Notifications
You must be signed in to change notification settings - Fork 226
Closed
Labels
Good First IssueGood for newcomersGood for newcomers
Description
> Can there be an `Action<Scope> configureScope` parameter on `CaptureFeedback`? [The documentation](https://docs.sentry.io/platforms/dotnet/enriching-events/scopes/#using-scope-callback-parameter) even says:
That particular example shows the CaptureException method... but yes, those docs do say the scope can be passed on all capture methods - so we should probably add this.
It's really just a convenience. As a workaround, in the meantime, the same can be achieved by:
using (var scopeTracker = SentrySdk.PushScope())
{
SentrySdk.ConfigureScope(s =>
{
s.SetTag("my-tag", "my value");
s.User = new SentryUser
{
Id = "42",
Email = "[email protected]"
};
});
var feedback = new SentryFeedback(message, contactEmail, name);
SentrySdk.CaptureFeedback(feedback, hint: hint);
}Note that the temporary local scope gets popped when scopeTracker gets disposed above... so important to dispose of it before creating other events that you don't want that scope applied to.
Originally posted by @jamescrosswell in #3981 (comment)
codecat
Metadata
Metadata
Assignees
Labels
Good First IssueGood for newcomersGood for newcomers
Projects
Status
Done