Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
1f9ef4e
Divided commit into two branches for reviewers. Added attribute provi…
konraddysput Apr 21, 2021
e3fce77
Adjusted labels
konraddysput Apr 21, 2021
ae27e45
Start default event on the application startup + send empty string in…
konraddysput Apr 22, 2021
ea7b5b7
Event aggregation logic for reviewers (#74)
konraddysput Apr 30, 2021
1e2d885
line ending fix
konraddysput Apr 30, 2021
2ed2d7f
Fixed invalid property name after merge
konraddysput May 5, 2021
8c2cec9
Adjusted nullable JSON values
konraddysput May 5, 2021
c8ba940
Create attribute provider dynamically
konraddysput May 6, 2021
a649e4f
Enable attribute provider
konraddysput May 6, 2021
c12352b
Disable maximum number of events in store from config
konraddysput May 6, 2021
7be8a50
Adjust session aggregation support to spec requirements and meeting s…
konraddysput May 6, 2021
a698a1c
Fixed typo
konraddysput May 6, 2021
c7d631f
git attributes for line endings
konraddysput May 6, 2021
318ed34
Adjust current flow to new requirements + editor changes
konraddysput May 7, 2021
bbc97df
Allow for overriding default unique event
konraddysput May 7, 2021
1743228
Added getter and setter for backtracesesion support
konraddysput May 7, 2021
ee99b35
Adjust backtrace session object
konraddysput May 7, 2021
caa300f
Backtrace session API improvements
konraddysput May 9, 2021
78cae63
Safe native attribute ios
konraddysput May 10, 2021
9f90800
Safe native attributes
konraddysput May 10, 2021
213f3c1
Adjusted native build
konraddysput May 10, 2021
0d3c371
Use empty list of classifiers instead of empty string
konraddysput May 10, 2021
e48d951
Adjusted API
konraddysput May 11, 2021
1366213
Adjusted API + Session=>Summed + BacktraceSession=>BacktraceMetrics
konraddysput May 11, 2021
a536fa3
Adjusted API + Session=>Summed + BacktraceSession=>BacktraceMetrics
konraddysput May 11, 2021
dd14215
Renamed ms to sec
konraddysput May 12, 2021
2b13b89
Event aggregation support (#79)
konraddysput May 12, 2021
9ced22d
Fixed stucture size (#80)
konraddysput May 12, 2021
6ec1287
Guess native library path when application context is not available (…
konraddysput May 12, 2021
0123264
Renamed ms to sec
konraddysput May 12, 2021
1fae668
Merge branch 'feature/event-aggregation' into release/3.5.0
konraddysput May 12, 2021
e5b75f6
Handle different unity player java class name (#87)
konraddysput May 19, 2021
c06c453
Removed warnings generated by Unity2020 + Unity2021 (#85)
konraddysput May 19, 2021
69cf0f0
Metrics support imrovements (#88)
konraddysput May 20, 2021
32310fc
Breadcrumbs support (#83)
konraddysput May 21, 2021
af2714e
Fixed compilation issue
konraddysput May 21, 2021
792eb0e
Don't dispose before checking network status
konraddysput May 21, 2021
fcca658
Use UTC timestamp
konraddysput May 23, 2021
af93f4d
Removed universe ane token submission URL - allow user to override th…
konraddysput May 25, 2021
20e30cd
fixed line endings
konraddysput May 25, 2021
0caa32b
Editor configuraiton improvements - foldout improvements
konraddysput May 25, 2021
f10a855
Apply default log file size
konraddysput May 25, 2021
050f01e
Label change
konraddysput May 26, 2021
ca4ccb1
Final ios library
konraddysput May 26, 2021
282c324
Use copy of attributes
konraddysput May 26, 2021
046cfd8
Fixed reference shared between native client and managed client
konraddysput May 26, 2021
c28e0d4
applicaiton.session attribute
konraddysput May 26, 2021
d7f8016
Limit number of events to 50
konraddysput May 27, 2021
087e93c
Use breadcrumbs as double not long
konraddysput May 27, 2021
5d49db6
Use only one variable to determinate maximum number of elements in queue
konraddysput May 27, 2021
24935aa
Setting maximum number of events per unique/summed events + breadcrum…
konraddysput May 28, 2021
7ea2e21
Getter/Setter api interface improvements
konraddysput May 28, 2021
c7062e7
Breadcrumbs improvements -> changed types + metrics expose maximum nu…
konraddysput May 28, 2021
dbf7f19
Unit tests for 502 status code + disabled auto send, long => uint api…
konraddysput May 31, 2021
b88e1e7
Changed breadcurmb type: http => system for internet connection check
konraddysput May 31, 2021
b615d60
Read application version and name from cache to add support for back…
konraddysput May 31, 2021
902b001
Block WebGL
konraddysput Jun 1, 2021
7651e84
Calculate retry based on the time
konraddysput Jun 1, 2021
8efd97e
version update
konraddysput Jun 1, 2021
169d303
Update CHANGELOG.md
vlussenburg Jun 1, 2021
a9336eb
Update CHANGELOG.md
vlussenburg Jun 1, 2021
f78f1e6
Update README.md
vlussenburg Jun 1, 2021
806aa05
Update README.md
vlussenburg Jun 1, 2021
f35722d
Update README.md
vlussenburg Jun 1, 2021
a3e59c8
Update README.md
vlussenburg Jun 1, 2021
3d5d3a6
Update README.md
vlussenburg Jun 1, 2021
dc3e596
Update CHANGELOG.md
Jun 1, 2021
aed7f18
TOC Update for Breadcrumbs and Crash Free Metrics
Jun 1, 2021
d4a2699
Ignore LogType.Error (#92)
konraddysput Jun 8, 2021
bbc262b
Screenshot management (#91)
konraddysput Jun 8, 2021
4134ff4
version bump: preview.2 update
konraddysput Jun 8, 2021
bf1815c
Adjusted attachments + breadcrumbs support
konraddysput Jun 10, 2021
a20166c
Allow overriding default attributes
konraddysput Jun 10, 2021
0b3d1ca
Add missing namespace
konraddysput Jun 10, 2021
420ae8c
Application.session + api adjustements backtrace metrics
konraddysput Jun 14, 2021
278032e
empty json object adjustement
konraddysput Jun 15, 2021
78c88fb
Windows native dump event aggregation attributes
konraddysput Jun 15, 2021
55870fb
Correct unit test namespace
konraddysput Jun 15, 2021
7fedd71
Convert device attributes to scoped attributes + include native attri…
konraddysput Jun 16, 2021
9f75432
Breadcrumbs log level tooltip adjustement
konraddysput Jun 21, 2021
84a0774
Native upload handler tests
konraddysput Jun 21, 2021
b7bb1c1
Version 3.5.0: Version update
konraddysput Jun 21, 2021
2acebdc
Update README.md
vlussenburg Jun 21, 2021
a6d1cfc
Update README.md
vlussenburg Jun 21, 2021
e4fdc98
Update CHANGELOG.md
vlussenburg Jun 21, 2021
8e0b11f
Update README.md
vlussenburg Jun 21, 2021
bba070f
Label change
konraddysput Jun 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Custom for C# files
*.cs eol=clrf

# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Backtrace Unity Release Notes

## Version 3.5.0

New functionality

- Support for capturing metrics to determine crash free users and sessions for your game. Once enabled, unique application launches and unique player identifiers (default: `guid`) will be submitted to Backtrace so you will be able to get an overview in our web console of how many errors, hangs, crashes and memory problems occur compared to all active users for a given platform, version, etcetera. See the README for more info on functionality and configuration options. This functionality is supported on all Unity supported platforms except WebGL.
- Support for breadcrumbs. Once enabled, various "breadcrumb" events (such as application going to background, log message, network connectivity lost and many more) will be submitted with all types of Backtrace reports and viewable in the web console. It is possible to configure client-side which events to include and from which log level severity. It is also possible to add custom events, like "player completed a level", via the API. By default the breadcrumbs are limited to 64kB, and when the limit is reached, the oldest events will automatically be removed to make space for newer breadcrumbs. See the README for more information on functionality and configuration options. This functionality is supported on all Unity supported platforms.
- Support for controlling the size and quality of the JPEG screenshots captured, to reduce bandwith and storage.
- Support for filtering out DebugLog error messages.

Removed

- Support for .NET 2.0 was removed. .NET 2.0 has been end of life for some time. If support is required for .NET 2.0, please use backtrace-unity 3.4.x

Bugfixes

- Fixed Unity 2020 & 2021 warnings
- Adjusted structure size on the iOS build
- Guess backtrace-android native crash reporter path if appcontext is not available

## Version 3.4.0

- native/managed attachment support - user can add path to attachments via BacktraceClient Initialize method or via Unity Editor in the BacktraceClient's inspector. Once user add them on the initialization method/game object - it will be available in every report that BacktraceClient will send to Backtrace.
Expand Down
2 changes: 1 addition & 1 deletion Editor/BacktraceClientEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class BacktraceClientEditor : UnityEditor.Editor
public override void OnInspectorGUI()
{
if (Application.isPlaying)
{
{
return;
}
var component = (BacktraceClient)target;
Expand Down
60 changes: 49 additions & 11 deletions Editor/BacktraceConfigurationEditor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Backtrace.Unity.Model;
using System;
using UnityEditor;
using UnityEngine;

Expand All @@ -7,6 +8,8 @@ namespace Backtrace.Unity.Editor
[CustomEditor(typeof(BacktraceConfiguration))]
public class BacktraceConfigurationEditor : UnityEditor.Editor
{
protected static bool showBreadcrumbsSettings = false;
protected static bool showMetricsSettings = false;
protected static bool showClientAdvancedSettings = false;
protected static bool showDatabaseSettings = false;

Expand Down Expand Up @@ -68,10 +71,6 @@ public override void OnInspectorGUI()
serializedObject.FindProperty("ReportFilterType"),
new GUIContent(BacktraceConfigurationLabels.LABEL_REPORT_FILTER));

EditorGUILayout.PropertyField(
serializedObject.FindProperty("NumberOfLogs"),
new GUIContent(BacktraceConfigurationLabels.LABEL_NUMBER_OF_LOGS));

EditorGUILayout.PropertyField(
serializedObject.FindProperty("PerformanceStatistics"),
new GUIContent(BacktraceConfigurationLabels.LABEL_PERFORMANCE_STATISTICS));
Expand All @@ -93,11 +92,28 @@ public override void OnInspectorGUI()
}
}

#if UNITY_ANDROID || UNITY_IOS
EditorGUILayout.PropertyField(
serializedObject.FindProperty("AttachmentPaths"),
new GUIContent(BacktraceConfigurationLabels.LABEL_REPORT_ATTACHMENTS));
#if !UNITY_WEBGL
GUIStyle metricsFoldout = new GUIStyle(EditorStyles.foldout);
showMetricsSettings = EditorGUILayout.Foldout(showMetricsSettings, BacktraceConfigurationLabels.LABEL_CRASH_FREE_SECTION, metricsFoldout);
if (showMetricsSettings)
{
var enableMetrics = serializedObject.FindProperty("EnableMetricsSupport");
EditorGUILayout.PropertyField(
enableMetrics,
new GUIContent(BacktraceConfigurationLabels.LABEL_ENABLE_METRICS));

if (enableMetrics.boolValue)
{
EditorGUILayout.PropertyField(
serializedObject.FindProperty("TimeIntervalInMin"),
new GUIContent(BacktraceConfigurationLabels.LABEL_METRICS_TIME_INTERVAL));
}
}
#endif
EditorGUILayout.PropertyField(
serializedObject.FindProperty("AttachmentPaths"),
new GUIContent(BacktraceConfigurationLabels.LABEL_REPORT_ATTACHMENTS));


#if !UNITY_SWITCH
SerializedProperty enabled = serializedObject.FindProperty("Enabled");
Expand Down Expand Up @@ -138,10 +154,32 @@ public override void OnInspectorGUI()

#endif


GUIStyle breadcrumbsSupportFoldout = new GUIStyle(EditorStyles.foldout);
showBreadcrumbsSettings = EditorGUILayout.Foldout(showBreadcrumbsSettings, BacktraceConfigurationLabels.LABEL_BREADCRUMBS_SECTION, breadcrumbsSupportFoldout);
if (showBreadcrumbsSettings)
{
var enableBreadcrumbsSupport = serializedObject.FindProperty("EnableBreadcrumbsSupport");
EditorGUILayout.PropertyField(
enableBreadcrumbsSupport,
new GUIContent(BacktraceConfigurationLabels.LABEL_ENABLE_BREADCRUMBS));

if (enableBreadcrumbsSupport.boolValue)
{
EditorGUILayout.PropertyField(
serializedObject.FindProperty("BacktraceBreadcrumbsLevel"),
new GUIContent(BacktraceConfigurationLabels.LABEL_BREADCRUMBS_EVENTS));

EditorGUILayout.PropertyField(
serializedObject.FindProperty("LogLevel"),
new GUIContent(BacktraceConfigurationLabels.LABEL_BREADCRUMNS_LOG_LEVEL));
}
}

#if UNITY_ANDROID || UNITY_IOS
EditorGUILayout.PropertyField(
serializedObject.FindProperty("CaptureNativeCrashes"),
new GUIContent(BacktraceConfigurationLabels.CAPTURE_NATIVE_CRASHES));
serializedObject.FindProperty("CaptureNativeCrashes"),
new GUIContent(BacktraceConfigurationLabels.CAPTURE_NATIVE_CRASHES));
#endif
EditorGUILayout.PropertyField(
serializedObject.FindProperty("AutoSendMode"),
Expand Down Expand Up @@ -172,8 +210,8 @@ public override void OnInspectorGUI()
EditorGUILayout.PropertyField(retryOrder, new GUIContent(BacktraceConfigurationLabels.LABEL_RETRY_ORDER));
}
}

serializedObject.ApplyModifiedProperties();
}
}

}
19 changes: 11 additions & 8 deletions Editor/BacktraceConfigurationLabels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,21 @@ internal static class BacktraceConfigurationLabels
internal static string LABEL_SAMPLING = "Log random sampling rate";
internal static string LABEL_HANDLE_ANR = "Handle ANR (Application not responding)";
#if UNITY_ANDROID || UNITY_IOS
internal static string LABEL_HANDLE_OOM =
#if UNITY_ANDROID
"(Early access) Send Low memory warnings to Backtrace";
#elif UNITY_IOS
"(Early access) Send Out of memory exceptions to Backtrace";
#endif
internal static string LABEL_HANDLE_OOM = "Send Out of Memory exceptions to Backtrace";
#endif

internal const string LABEL_ENABLE_METRICS = "Enable crash free metrics reporting";
internal const string LABEL_METRICS_TIME_INTERVAL = "Auto send interval in min";
internal const string LABEL_CRASH_FREE_SECTION = "Crash Free Metrics Reporting";

internal const string LABEL_BREADCRUMBS_SECTION = "Breadcrumbs support";
internal const string LABEL_ENABLE_BREADCRUMBS = "Enable breadcrumbs support";
internal const string LABEL_BREADCRUMBS_EVENTS = "Breadcrumbs events type";
internal const string LABEL_BREADCRUMNS_LOG_LEVEL = "Breadcrumbs log level";

internal static string LABEL_REPORT_ATTACHMENTS = "Report attachment paths";
internal static string CAPTURE_NATIVE_CRASHES = "Capture native crashes";
internal static string LABEL_REPORT_FILTER = "Filter reports";
internal static string LABEL_NUMBER_OF_LOGS = "Collect last n game logs";
internal static string LABEL_GAME_OBJECT_DEPTH = "Game object depth limit";
internal static string LABEL_IGNORE_SSL_VALIDATION = "Ignore SSL validation";
internal static string LABEL_SEND_UNHANDLED_GAME_CRASHES_ON_STARTUP = "Send unhandled native game crashes on startup";
Expand All @@ -43,6 +47,5 @@ internal static class BacktraceConfigurationLabels
internal static string LABEL_RETRY_INTERVAL = "Retry interval";
internal static string LABEL_RETRY_LIMIT = "Maximum retries";
internal static string LABEL_RETRY_ORDER = "Retry order (FIFO/LIFO)";

}
}
7 changes: 3 additions & 4 deletions Editor/BacktraceMenu.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if UNITY_EDITOR
using System;
using Backtrace.Unity.Model;
using System.IO;
using System.Linq;
Expand All @@ -17,12 +16,12 @@ public class BacktraceMenu : MonoBehaviour
[MenuItem("Assets/Backtrace/Configuration", false, 1)]
public static void CreateClientConfigurationFile()
{
CreateAsset<BacktraceConfiguration>(DEFAULT_CLIENT_CONFIGURATION_NAME);
CreateAsset(DEFAULT_CLIENT_CONFIGURATION_NAME);
}

private static void CreateAsset<T>(string fileName) where T : ScriptableObject
private static void CreateAsset(string fileName)
{
T asset = ScriptableObject.CreateInstance<T>();
BacktraceConfiguration asset = ScriptableObject.CreateInstance<BacktraceConfiguration>();
var currentProjectPath = AssetDatabase.GetAssetPath(Selection.activeObject);
if (string.IsNullOrEmpty(currentProjectPath))
{
Expand Down
12 changes: 9 additions & 3 deletions Editor/Native/Android/SymbolsUpload.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#if UNITY_2019_2_OR_NEWER && UNITY_ANDROID
using Backtrace.Unity.Model;
using Backtrace.Unity.Extensions;
using System;
using System.Collections.Generic;
using System.IO;
Expand All @@ -25,8 +26,14 @@ public int callbackOrder

public void OnPostprocessBuild(BuildReport report)
{
var disabledSymbols =
#if UNITY_2021_1_OR_NEWER
EditorUserBuildSettings.androidCreateSymbols == AndroidCreateSymbols.Disabled;
#else
EditorUserBuildSettings.androidCreateSymbolsZip == false;
#endif
// symbols upload is availble only on the il2cpp Android builds
if (report.summary.platform != BuildTarget.Android || !EditorUserBuildSettings.androidCreateSymbolsZip)
if (report.summary.platform != BuildTarget.Android || disabledSymbols)
{
return;
}
Expand Down Expand Up @@ -184,8 +191,7 @@ private void UploadSymbols(string serverUrl, string symbolsToken, string symbols
{
EditorUtility.DisplayProgressBar("Backtrace symbols upload", "Symbols upload progress:", request.uploadProgress);
}
var failure = request.isNetworkError || request.isHttpError;
if (failure)
if (request.ReceivedNetworkError())
{
Debug.LogWarning(string.Format("Cannot upload symbols to Backtrace. Reason: {0}", request.downloadHandler.text));
return;
Expand Down
Loading