@@ -33,7 +33,7 @@ internal AndroidOptions() { }
3333 /// <remarks>
3434 /// See https://docs.sentry.io/platforms/android/configuration/app-not-respond/
3535 /// </remarks>
36- public bool AnrReportInDebug { get ; set ; }
36+ public bool AnrReportInDebug { get ; set ; } = false ;
3737
3838 /// <summary>
3939 /// Gets or sets the ANR (Application Not Responding) timeout interval.
@@ -53,7 +53,7 @@ internal AndroidOptions() { }
5353 /// This feature is provided by the Sentry Android SDK and thus only works for Java-based errors.
5454 /// See https://docs.sentry.io/platforms/android/enriching-events/screenshots/
5555 /// </remarks>
56- public bool AttachScreenshot { get ; set ; }
56+ public bool AttachScreenshot { get ; set ; } = false ;
5757
5858 /// <summary>
5959 /// Gets or sets a value that indicates if automatic breadcrumbs for <c>Activity</c> lifecycle events are
@@ -129,7 +129,7 @@ internal AndroidOptions() { }
129129 /// <remarks>
130130 /// See https://docs.sentry.io/platforms/android/performance/instrumentation/automatic-instrumentation/#user-interaction-instrumentation
131131 /// </remarks>
132- public bool EnableUserInteractionTracing { get ; set ; }
132+ public bool EnableUserInteractionTracing { get ; set ; } = false ;
133133
134134 /// <summary>
135135 /// Gets or sets the interval for profiling traces, when enabled with <see cref="ProfilingEnabled"/>.
@@ -144,22 +144,22 @@ internal AndroidOptions() { }
144144 /// Gets or sets a value that indicates if all the threads are automatically attached to all logged events.
145145 /// The default value is <c>false</c> (disabled).
146146 /// </summary>
147- public bool AttachThreads { get ; set ; }
147+ public bool AttachThreads { get ; set ; } = false ;
148148
149149 /// <summary>
150150 /// Gets or sets the connection timeout on the HTTP connection used by Java when sending data to Sentry.
151151 /// The default value is 5 seconds.
152152 /// </summary>
153153 public TimeSpan ConnectionTimeout { get ; set ; } = TimeSpan . FromSeconds ( 5 ) ;
154154
155- // TODO: Should we have this Distribution property on SentryOptions (with Release and Environment)?
156155 /// <summary>
157- /// Gets or sets the distribution.
156+ /// Gets or sets the distribution of the application .
158157 /// </summary>
159158 /// <remarks>
160- /// See https://docs .sentry.io/platforms/java/guides/spring/configuration/#distribution
159+ /// See "dist" in https://develop .sentry.dev/sdk/event-payloads/#optional-attributes
161160 /// </remarks>
162- public string ? Distribution { get ; set ; }
161+ // TODO: Should we have this property on the main SentryOptions (with Release and Environment)?
162+ public string ? Distribution { get ; set ; } = null ;
163163
164164 /// <summary>
165165 /// Gets or sets a value that indicates if the NDK (Android Native Development Kit) is enabled.
@@ -186,14 +186,14 @@ internal AndroidOptions() { }
186186 /// Gets or sets a value that indicates if uncaught Java errors will have their stack traces
187187 /// printed to the standard error stream. The default value is <c>false</c> (disabled).
188188 /// </summary>
189- public bool PrintUncaughtStackTrace { get ; set ; }
189+ public bool PrintUncaughtStackTrace { get ; set ; } = false ;
190190
191191 /// <summary>
192192 /// Gets or sets if profiling is enabled for transactions.
193193 /// The default value is <c>false</c> (disabled).
194194 /// See also <see cref="ProfilingTracesInterval"/>.
195195 /// </summary>
196- public bool ProfilingEnabled { get ; set ; }
196+ public bool ProfilingEnabled { get ; set ; } = false ;
197197
198198 /// <summary>
199199 /// Gets or sets the read timeout on the HTTP connection used by Java when sending data to Sentry.
@@ -204,8 +204,8 @@ internal AndroidOptions() { }
204204
205205 // ---------- Other ----------
206206
207- internal string [ ] ? InAppExclude { get ; set ; }
208- internal string [ ] ? InAppInclude { get ; set ; }
207+ internal List < string > ? InAppExcludes { get ; private set ; }
208+ internal List < string > ? InAppIncludes { get ; private set ; }
209209
210210 /// <summary>
211211 /// Add prefix to exclude from 'InApp' stacktrace list by the Android SDK.
@@ -218,10 +218,11 @@ internal AndroidOptions() { }
218218 /// <example>
219219 /// 'java.util.', 'org.apache.logging.log4j.'
220220 /// </example>
221- public void AddInAppExclude ( string prefix ) =>
222- InAppExclude = InAppExclude != null
223- ? InAppExclude . Concat ( new [ ] { prefix } ) . ToArray ( )
224- : new [ ] { prefix } ;
221+ public void AddInAppExclude ( string prefix )
222+ {
223+ InAppExcludes ??= new List < string > ( ) ;
224+ InAppExcludes . Add ( prefix ) ;
225+ }
225226
226227 /// <summary>
227228 /// Add prefix to include as in 'InApp' stacktrace by the Android SDK.
@@ -234,26 +235,26 @@ public void AddInAppExclude(string prefix) =>
234235 /// <example>
235236 /// 'java.util.customcode.', 'io.sentry.samples.'
236237 /// </example>
237- public void AddInAppInclude ( string prefix ) =>
238- InAppInclude = InAppInclude != null
239- ? InAppInclude . Concat ( new [ ] { prefix } ) . ToArray ( )
240- : new [ ] { prefix } ;
238+ public void AddInAppInclude ( string prefix ) {
239+ InAppIncludes ??= new List < string > ( ) ;
240+ InAppIncludes . Add ( prefix ) ;
241+ }
241242
242243 /// <summary>
243244 /// Gets or sets a value that indicates if tracing features are enabled on the embedded Android SDK.
244245 /// The default value is <c>false</c> (disabled).
245246 /// </summary>
246- public bool EnableAndroidSdkTracing { get ; set ; }
247+ public bool EnableAndroidSdkTracing { get ; set ; } = false ;
247248
248249 /// <summary>
249250 /// Gets or sets a value that indicates if the <see cref="BeforeSend"/> callback will be invoked for
250251 /// events that originate from the embedded Android SDK. The default value is <c>false</c> (disabled).
251252 /// </summary>
252253 /// <remarks>
253- /// This is an experimental feature and is imperefct , as the .NET SDK and the embedded Android SDK don't
254+ /// This is an experimental feature and is imperfect , as the .NET SDK and the embedded Android SDK don't
254255 /// implement all of the same features that may be present in the event graph. Some optional elements may
255- /// be stripped away during the roundtripping between the two SDKs. Use with caution.
256+ /// be stripped away during the round-tripping between the two SDKs. Use with caution.
256257 /// </remarks>
257- public bool EnableAndroidSdkBeforeSend { get ; set ; }
258+ public bool EnableAndroidSdkBeforeSend { get ; set ; } = false ;
258259 }
259260}
0 commit comments