Skip to content
이 내용이 도움이 되었나요?

SDK 이벤트 로깅

앱인토스 Unity SDK는 런타임 이벤트를 자동으로 수집해요.
[RuntimeInitializeOnLoadMethod]로 자동 초기화되어 별도의 코드 작성이 필요 없어요.

모든 이벤트의 log_type"unity_runtime"이에요.


이벤트 카테고리

#log_name트리거Rate Limit
1unity_scene_transitionSceneManager.sceneLoaded/sceneUnloaded없음
2unity_low_memoryApplication.lowMemory30초당 1회
3unity_errorApplication.logMessageReceived (Error/Exception/Assert)60초당 10회 + 중복 제거
4unity_lifecycleApplication.focusChanged, Application.quittingfocus: 5초당 1회
5unity_frame_stallUpdate() delta > 500ms60초당 5회
6unity_screen_changeScreen.width/height/orientation 변경 감지2초당 1회
7unity_gc_collectionGC.CollectionCount() 변화 감지60초당 5회
8unity_timescale_changeTime.timeScale 변경 감지5초당 1회

이벤트별 파라미터

1. Scene 전환 (unity_scene_transition)

json
{
  "event_type": "scene_loaded",
  "scene_name": "GameScene",
  "scene_build_index": 2,
  "load_mode": "Single",
  "previous_scene": "MainMenu",
  "total_loaded_scenes": 3,
  "time_since_start_sec": 12.5
}
파라미터설명event_type
event_typescene_loaded 또는 scene_unloaded전체
scene_nameScene 이름전체
scene_build_indexBuild Settings 인덱스전체
load_modeSingle 또는 Additivescene_loaded만
previous_scene이전 활성 Scene 이름scene_loaded만
total_loaded_scenes현재 로드된 Scene 수전체
time_since_start_sec앱 시작 이후 경과 시간전체

2. Low Memory (unity_low_memory)

json
{
  "event_type": "low_memory",
  "time_since_start_sec": 120.5
}

3. 에러/예외 (unity_error)

json
{
  "event_type": "exception",
  "message": "NullReferenceException: ...",
  "stack_trace": "at GameManager.Update() ...",
  "log_type": "Exception",
  "time_since_start_sec": 45.2
}
파라미터설명
event_typeerror, exception, assert
message에러 메시지 (최대 500자)
stack_trace스택 트레이스 (최대 200자)
log_typeUnity LogType (Error, Exception, Assert)

4. 앱 라이프사이클 (unity_lifecycle)

json
{ "event_type": "focus_changed", "has_focus": true, "time_since_start_sec": 120.5 }
{ "event_type": "quitting", "session_duration_sec": 300.5, "total_scenes_loaded": 5 }

5. 프레임 스톨 (unity_frame_stall)

json
{
  "event_type": "frame_stall",
  "frame_duration_ms": 750,
  "threshold_ms": 500,
  "time_since_start_sec": 45.2
}

6. 화면 변경 (unity_screen_change)

json
{ "event_type": "screen_resize", "width": 1920, "height": 1080, "previous_width": 1280, "previous_height": 720 }
{ "event_type": "orientation_change", "width": 1080, "height": 1920, "orientation": "Portrait", "previous_orientation": "LandscapeLeft" }

7. GC 수집 (unity_gc_collection)

json
{
  "event_type": "gc_collection",
  "generation": 1,
  "gen0_total": 45,
  "gen1_total": 12,
  "gen2_total": 3,
  "time_since_start_sec": 60.0
}

8. TimeScale 변경 (unity_timescale_change)

json
{
  "event_type": "timescale_changed",
  "time_scale": 0.0,
  "previous_time_scale": 1.0,
  "time_since_start_sec": 15.0
}

안전장치

항목설명
try-catch모든 핸들러를 감싸서 로깅이 게임을 크래시하지 않아요
재진입 방지_isSending guard로 logMessageReceived 무한루프를 방지해요
Rate Limiting카테고리별 고정 rate limit으로 과도한 전송을 방지해요