integrationlatest데이터 연동 / 실시간 디버깅
실시간 디버깅
주의
SDK 디버그 모드는 연동 디버깅에만 사용하며, 운영 환경에서는 절대 사용하지 마십시오.
로그 출력 활성화
ThinkingData::set_enable_log(true)
Debug 모드로 데이터 유효성 검증
SDK 연동 과정에서 AE의 디버그 기능을 사용하여 실시간으로 디버깅할 수 있습니다. 디버그 기능을 사용하려면 다음 두 단계가 필요합니다.
- TDDebugConsumer 사용
다음은 TDDebugConsumer를 사용하는 예시 코드입니다:
consumer = ThinkingData::TDDebugConsumer.new('SERVER_URL', 'APPID', device_id: "123456789")
ta = ThinkingData::TDAnalytics.new(consumer)
DEMO_ACCOUNT_ID = '123'
DEMO_DISTINCT_ID = 'aaa'
properties = {
array: ["str1", "11", Time.now, "2020-02-11 17:02:52.415"],
prop_date: Time.now,
prop_double: 134.1,
prop_string: 'hello world',
prop_bool: true,
}
ta.track(event_name: 'test_event', distinct_id: DEMO_DISTINCT_ID, account_id: DEMO_ACCOUNT_ID, properties: properties)
디버그 모드는 데이터 수집 품질과 App의 안정성에 영향을 줄 수 있으므로 연동 단계의 데이터 검증에만 사용하고 운영 환경에서는 사용하지 마십시오.
이 문서가 도움이 되었나요?

