File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed
src/Sentry.Unity/Integrations Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 44
55### Features
66
7+ - The SDK now reports the game's name as part of the app context ([ 2083] ( https://github.com/getsentry/sentry-unity/pull/2083 ) )
78- The SDK now reports the active scene's name as part of the ` Unity Context ` ([ 2084] ( https://github.com/getsentry/sentry-unity/pull/2084 ) )
89
910### Dependencies
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ private static void PopulateSdk(SdkVersion sdk)
6868
6969 private void PopulateApp ( App app )
7070 {
71+ app . Name = _application . ProductName ;
7172 app . StartTime = MainThreadData . StartTime ;
7273 var isDebugBuild = MainThreadData . IsDebugBuild ;
7374 app . BuildType = isDebugBuild is null ? null : ( isDebugBuild . Value ? "debug" : "release" ) ;
Original file line number Diff line number Diff line change @@ -259,17 +259,34 @@ public void DeviceUniqueIdentifierWithSendDefaultPii_IsNotNull()
259259 public void AppProtocol_Assigned ( )
260260 {
261261 // arrange
262+ _testApplication = new TestApplication ( productName : "TestGame" ) ;
262263 var sut = new UnityScopeUpdater ( _sentryOptions , _testApplication ) ;
263264 var scope = new Scope ( _sentryOptions ) ;
264265
265266 // act
266267 sut . ConfigureScope ( scope ) ;
267268
268269 // assert
270+ Assert . IsNotNull ( scope . Contexts . App . Name ) ;
269271 Assert . IsNotNull ( scope . Contexts . App . StartTime ) ;
270272 Assert . IsNotNull ( scope . Contexts . App . BuildType ) ;
271273 }
272274
275+ [ Test ]
276+ public void AppProtocol_AppNameIsApplicationName ( )
277+ {
278+ // arrange
279+ _testApplication = new TestApplication ( productName : "TestGame" ) ;
280+ var sut = new UnityScopeUpdater ( _sentryOptions , _testApplication ) ;
281+ var scope = new Scope ( _sentryOptions ) ;
282+
283+ // act
284+ sut . ConfigureScope ( scope ) ;
285+
286+ // assert
287+ Assert . AreEqual ( scope . Contexts . App . Name , _testApplication . ProductName ) ;
288+ }
289+
273290 [ Test ]
274291 public void UserId_SetIfEmpty ( )
275292 {
You can’t perform that action at this time.
0 commit comments