1

I want to not collect all the user/device context, like location, remaining battery and so on. Can I configure it somehow?

Here's my config:

.UseSentry(options => {
    options.Dsn = "...";
    options.CacheDirectoryPath = FileSystem.CacheDirectory; 
    options.InitCacheFlushTimeout = TimeSpan.FromSeconds(2);
    options.IsGlobalModeEnabled = true;
    options.TracesSampleRate = 0;
    options.TracesSampler = context => null;
    options.AutoSessionTracking = false;
    options.SendDefaultPii = false;
    options.DiagnosticLevel = SentryLevel.Warning;});

1 Answer 1

0

Before the Sentry SDK sends data to the server, it passes through the BeforeSend callback.

You can mutate the whole event there, for example setting some value to null

Docs on this are here: https://docs.sentry.io/platforms/dotnet/guides/maui/configuration/options/#SetBeforeSend

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.