File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed
tests/sentry/event_manager/interfaces Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,15 @@ class OtelContextType(ContextType):
236236 context_to_tag_mapping = {}
237237
238238
239+ @contexttype
240+ class UnityContextType (ContextType ):
241+ type = "unity"
242+ context_to_tag_mapping = {
243+ "is_main_thread" : "{is_main_thread}" ,
244+ "install_mode" : "{install_mode}" ,
245+ }
246+
247+
239248class Contexts (Interface ):
240249 """
241250 This interface stores context specific information.
Original file line number Diff line number Diff line change 1+ ---
2+ source: tests/sentry/event_manager/interfaces/test_contexts.py
3+ ---
4+ errors: null
5+ tags:
6+ - - unity.install_mode
7+ - Store
8+ - - unity.is_main_thread
9+ - 'yes'
10+ to_json:
11+ unity:
12+ active_scene_name: MainScene
13+ editor_version: 2022.3.1f1
14+ install_mode: Store
15+ is_main_thread: true
16+ rendering_threading_mode: MultiThreaded
17+ target_frame_rate: '60'
18+ type: unity
Original file line number Diff line number Diff line change @@ -183,3 +183,18 @@ def test_large_nested_numbers() -> None:
183183 "type" : "default" ,
184184 }
185185 assert ctx_data == expected_data
186+
187+
188+ def test_unity (make_ctx_snapshot ) -> None :
189+ make_ctx_snapshot (
190+ {
191+ "unity" : {
192+ "active_scene_name" : "MainScene" ,
193+ "editor_version" : "2022.3.1f1" ,
194+ "install_mode" : "Store" ,
195+ "is_main_thread" : True ,
196+ "rendering_threading_mode" : "MultiThreaded" ,
197+ "target_frame_rate" : "60" ,
198+ }
199+ }
200+ )
You can’t perform that action at this time.
0 commit comments