-
-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathOptionsConfiguration.cs
49 lines (41 loc) · 1.58 KB
/
OptionsConfiguration.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using Sentry;
using Sentry.Unity;
using UnityEngine;
public class OptionsConfiguration : SentryOptionsConfiguration
{
public override void Configure(SentryUnityOptions options)
{
Debug.Log("Sentry: OptionsConfig::Configure() called");
options.Dsn = "http://publickey@"
#if UNITY_ANDROID
+ "10.0.2.2"
#elif UNITY_WEBGL
+ "127.0.0.1"
#else
+ "localhost"
#endif
+ ":8000/12345";
Debug.LogFormat("Sentry: Setting options.Dsn = {0}", options.Dsn);
options.AttachScreenshot = true;
options.Il2CppLineNumberSupportEnabled = true;
options.Debug = true;
options.DiagnosticLevel = SentryLevel.Debug;
options.TracesSampleRate = 1.0d;
options.PerformanceAutoInstrumentationEnabled = true;
// options.CreateHttpMessageHandler = () => SmokeTester.t;
SmokeTester.CrashedLastRun = () =>
{
if (options.CrashedLastRun != null)
{
return options.CrashedLastRun() ? 1 : 0;
}
return -2;
};
// If an ANR triggers while the smoke test runs, the test would fail because we expect exact order of events.
options.DisableAnrIntegration();
// These options will get overwritten by CI. This allows us to create artifacts for both initialization types.
options.AndroidNativeInitializationType = NativeInitializationType.Runtime;
options.IosNativeInitializationType = NativeInitializationType.Runtime;
Debug.Log("Sentry: OptionsConfig::Configure() finished");
}
}